Bug 246183 - linux_base-c7-7.8.2003 breaks resolver in stable12,11
Summary: linux_base-c7-7.8.2003 breaks resolver in stable12,11
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-04 18:15 UTC by lampa
Modified: 2020-05-05 18:32 UTC (History)
5 users (show)

See Also:


Attachments
linux_base-c7 patch (7.13 KB, patch)
2020-05-05 12:16 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lampa 2020-05-04 18:15:36 UTC
linux_base-c7-7.8.2003 port breaks resolver in linux emulation:

  1572 FAHClient CALL  linux_socket(0x2,0x80802,0)
  1572 FAHClient RET   linux_socket 8
  1572 FAHClient CALL  linux_setsockopt(0x8,0,0xb,0x907ffcb40,0x4)
  1572 FAHClient RET   linux_setsockopt -1 errno -92 Protocol not available
  1572 FAHClient CALL  close(0x8)
  1572 FAHClient GIO   fd 4 wrote 122 bytes
       0x0000 1b5b 3931 6d31 363a 3532 3a33 323a 4552  |.[91m16:52:32:ER|
       0x0010 524f 523a 5755 3030 3a46 5330 303a 4578  |ROR:WU00:FS00:Ex|
       0x0020 6365 7074 696f 6e3a 2043 6f75 6c64 206e  |ception: Could n|
       0x0030 6f74 2067 6574 2049 5020 6164 6472 6573  |ot get IP addres|
       0x0040 7320 666f 7220 6173 7369 676e 312e 666f  |s for assign1.fo|
       0x0050 6c64 696e 6761 7468 6f6d 652e 6f72 673a  |ldingathome.org:|

The option IP_RECVERR (0xb) is not emulated in compat/linux_socket.c

see
https://svnweb.freebsd.org/base?view=revision&revision=357202
https://svnweb.freebsd.org/base?view=revision&revision=358403
MFC in 2 weeks planned in January/February, not in stable-12, nor stable-11 in May

reverting /compat/linux/lib64/libresolv-2.17.so to previous version helps
Comment 1 Tijl Coosemans freebsd_committer 2020-05-04 20:53:58 UTC
trasz can you MFC those commits?  I'll see if I can let linux_base-c7 use an older glibc version.
Comment 2 Ralf van der Enden 2020-05-05 09:05:04 UTC
I've had the same issue after the upgrade to C7.8-2003. The workaround is to add the ip's and hostnames to /compat/linux/etc/hosts, but even though that "fixed" the IP issue, I ran into a SQLite3 issue, where fahclient cannot write to the database. See also: https://www.mail-archive.com/freebsd-stable@freebsd.org/msg138853.html
Comment 3 Bob Bishop 2020-05-05 09:24:20 UTC
Me too, FWIW. I don't have the sqlite issue though.
Comment 4 Tijl Coosemans freebsd_committer 2020-05-05 12:16:22 UTC
Created attachment 214154 [details]
linux_base-c7 patch

Can you try the attached patch for emulators/linux_base-c7?
Comment 5 lampa 2020-05-05 14:21:15 UTC
(In reply to Tijl Coosemans from comment #4)

Looks OK, both STABLE-11 and STABLE-12
Comment 6 commit-hook freebsd_committer 2020-05-05 18:32:17 UTC
A commit references this bug:

Author: tijl
Date: Tue May  5 18:31:56 UTC 2020
New revision: 534102
URL: https://svnweb.freebsd.org/changeset/ports/534102

Log:
  Downgrade glibc to the CentOS 7.7 version on FreeBSD 12 and older which
  cannot deal with the IP_RECVERR socket option yet.

  PR:		246183
  Reported by:	lampa@fit.vutbr.cz

Changes:
  head/emulators/linux_base-c7/Makefile
  head/emulators/linux_base-c7/distinfo
  head/emulators/linux_base-c7/pkg-plist.amd64
  head/emulators/linux_base-c7/pkg-plist.i386