[Bug 1100690] New: windows:mingw:win32/mingw32-cross-nsis: Bug segfault when used in OBS worker or OSC chroot
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 Bug ID: 1100690 Summary: windows:mingw:win32/mingw32-cross-nsis: Bug segfault when used in OBS worker or OSC chroot Classification: openSUSE Product: openSUSE.org Version: unspecified Hardware: x86-64 OS: openSUSE 42.3 Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software Assignee: fridrich.strba@bluewin.ch Reporter: thomas@ruecker.fi QA Contact: bnc-team-screening@forge.provo.novell.com CC: fstrba@suse.com, hib@hiberis.nl, idonmez@suse.com, mkbosmans@gmail.com, tlillqvist@suse.com Found By: --- Blocker: --- I've spent yesterday trying to figure out how to work around it. My package is: https://build.opensuse.org/package/show/home:dm8tbr/mingw32-icecast-installe... I forked mingw32-cross-nsis to ensure it wasn't a stale binary. I also included openSUSE_Leap_42.3:updates for that target to rule out it was the updated glibc. I verified that it happens on the following targets: * openSUSE_13.2 * openSUSE_Leap_15.0 * openSUSE_Leap_42.3 * openSUSE_Tumbleweed It happens both on OBS workers and in OSC build/chroot. It does however not happen on full distro installations. This made me at first suspect an undeclared runtime dependency, but I fail to find the usual signs of it in backtraces and strace output. $ osc build --clean win32_openSUSE_Leap_42.3 x86_64 … [ 16s] + makensis icecast.nsis -V4 [ 16s] Processing config: /etc/nsisconf.nsh [ 16s] Processing script file: "icecast.nsis" (UTF8) [ 16s] /var/tmp/rpm-tmp.5kt6vn: line 33: 8023 Segmentation fault makensis icecast.nsis -V4 [ 16s] error: Bad exit status from /var/tmp/rpm-tmp.5kt6vn (%build) $ strace -f makensis icecast.nsis -V4 … open("/usr/share/nsis/Include/Util.nsh", O_RDONLY) = 7 lseek(7, 0, SEEK_CUR) = 0 fstat(7, {st_mode=S_IFREG|0755, st_size=4659, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a4ad1e000 lseek(7, 0, SEEK_SET) = 0 read(7, "; ---------------------\r\n; "..., 4096) = 4096 lseek(7, 4096, SEEK_SET) = 4096 stat("/usr/share/nsis/Include/Util.nsh", {st_mode=S_IFREG|0755, st_size=4659, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=127, ...}) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1c72000} --- +++ killed by SIGSEGV +++ Segmentation fault $ gdb --args makensis icecast.nsis GNU gdb (GDB; openSUSE Leap 42.3) 8.0 … Reading symbols from makensis...Reading symbols from /usr/lib/debug/usr/bin/makensis.debug...done. done. (gdb) run Starting program: /usr/bin/makensis icecast.nsis [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Processing config: /etc/nsisconf.nsh Processing script file: "icecast.nsis" (UTF8) Program received signal SIGSEGV, Segmentation fault. wcslen () at ../sysdeps/x86_64/wcslen.S:126 126 ../sysdeps/x86_64/wcslen.S: No such file or directory. (gdb) bt #0 wcslen () at ../sysdeps/x86_64/wcslen.S:126 #1 0x0000000000440758 in CEXEBuild::GetMacro(wchar_t const*, wchar_t**) () #2 0x0000000000443f2d in CEXEBuild::pp_macro(LineParser&) () #3 0x0000000000435bad in CEXEBuild::doCommand(int, LineParser&) () #4 0x000000000043e9b3 in CEXEBuild::doParse(wchar_t const*) () #5 0x000000000043f6ee in CEXEBuild::parseScript() () #6 0x000000000044197d in CEXEBuild::includeScript(wchar_t const*, NStreamEncoding&) () #7 0x00000000004424f1 in CEXEBuild::pp_include(LineParser&) () #8 0x000000000043348a in CEXEBuild::doCommand(int, LineParser&) () #9 0x000000000043e9b3 in CEXEBuild::doParse(wchar_t const*) () #10 0x000000000043f6ee in CEXEBuild::parseScript() () #11 0x000000000044197d in CEXEBuild::includeScript(wchar_t const*, NStreamEncoding&) () #12 0x00000000004424f1 in CEXEBuild::pp_include(LineParser&) () #13 0x000000000043348a in CEXEBuild::doCommand(int, LineParser&) () #14 0x000000000043e9b3 in CEXEBuild::doParse(wchar_t const*) () #15 0x000000000043f6ee in CEXEBuild::parseScript() () #16 0x000000000044197d in CEXEBuild::includeScript(wchar_t const*, NStreamEncoding&) () #17 0x00000000004422d8 in CEXEBuild::pp_include(LineParser&) () #18 0x000000000043348a in CEXEBuild::doCommand(int, LineParser&) () #19 0x000000000043e9b3 in CEXEBuild::doParse(wchar_t const*) () #20 0x000000000043f6ee in CEXEBuild::parseScript() () #21 0x000000000044197d in CEXEBuild::includeScript(wchar_t const*, NStreamEncoding&) () #22 0x00000000004424f1 in CEXEBuild::pp_include(LineParser&) () #23 0x000000000043348a in CEXEBuild::doCommand(int, LineParser&) () #24 0x000000000043e9b3 in CEXEBuild::doParse(wchar_t const*) () #25 0x000000000043f6ee in CEXEBuild::parseScript() () #26 0x000000000043f8eb in CEXEBuild::process_script(NIStream&, wchar_t const*) () #27 0x0000000000421828 in makensismain(int, wchar_t**) () #28 0x00000000004046aa in main () There are no annotations despite the -debug packages being installed and makensis.debug being loaded. I inspected '/usr/share/nsis/Include/Util.nsh' but failed to spot anything obvious in the first two lines (bt indicates 5 lines being parsed?). I suspect it's *something* from one of the 900ish packages of a headless OpenSUSE install that makes this work. I tried installing all glibc packages to match things, but that didn't help. Running it as part of rpmbuild on a regular install works too. Oh, and yes, this has worked in the past. The last successful build run that I'm sure of is from 2016. I hope the package maintainer -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 Thomas B. Rücker <thomas@ruecker.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas@ruecker.fi -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c2 --- Comment #2 from Thomas B. Rücker <thomas@ruecker.fi> --- Unfortunately that doesn't seem to have addressed it. (windows:mingw:win32) mingw32-cross-nsis-3.03-1.31.x86_64.rpm yet: [ 9s] + makensis icecast.nsis -V4 [ 9s] Processing config: /etc/nsisconf.nsh [ 9s] Processing script file: "icecast.nsis" (UTF8) [ 9s] /var/tmp/rpm-tmp.ATM0QG: line 33: 1804 Segmentation fault makensis icecast.nsis -V4 [ 9s] error: Bad exit status from /var/tmp/rpm-tmp.ATM0QG (%build) Unfortunately I have no other ideas than to start installing all remaining packages of a headless opensuse to see which one makes it change behaviour. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c3 --- Comment #3 from Thomas B. Rücker <thomas@ruecker.fi> --- Some monkeying around with 'zypper packages --installed-only' and sed and friends later, I tested 'osc build' with a very long list of BuildRequires that matched the list of all installed packages on a machine where rpmbuild succeeds. In conclusion it looks like *something* in the environment of 'osc build' and a OBS builder makes makensis very unhappy. This is quite bad for Xiph.org as it means I can't have automated builds of installers on OBS. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c4 --- Comment #4 from Thomas B. Rücker <thomas@ruecker.fi> --- OK, so this is really obscure. More random poking, stracing, guessing. export -n MALLOC_CHECK_ *bam* it builds inside the chroot and using `osc build` conversely doing this on an openSUSE Leap 15: declare -x MALLOC_CHECK_="3" makes it segfault! So this looks like yet another malloc bug in makensis? For my purposes I'm going to do the ugly workaround of unsetting MALLOC_CHECK_ and MALLOC_PERTURB_ right before calling `makensis` in my RPM spec. I guess you might want to tell upstream about this. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c5 Ismail Dönmez <idonmez@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schwab@suse.de --- Comment #5 from Ismail Dönmez <idonmez@suse.com> --- Andreas, can you have a look at this, glibc should be reporting a backtrace here instead of just segfaulting. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c10 --- Comment #10 from Thomas B. Rücker <thomas@ruecker.fi> --- The segfault only occurs if that malloc feature is enabled. The mallopt manpage says that there should be a backtrace. (cf M_CHECK_ACTION) I'm a bit out of my depth, but the lack of output might indicate that the feature itself is encountering a problem. If you need more details I'll be happy to provide them. I'm just not familiar with debugging this beyond what I provided, so might need some pointer or example commands to run. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1100690 http://bugzilla.opensuse.org/show_bug.cgi?id=1100690#c12 Ralf Habacker <ralf.habacker@freenet.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ralf.habacker@freenet.de Resolution|--- |FIXED --- Comment #12 from Ralf Habacker <ralf.habacker@freenet.de> --- I just retried to build the mentioned package on opensuse leap 15.1 with osc version 0.166.git build version 20200520-354.1 and was not able to reproduce the mentioned issue. If the problem persists on currently supported distributions, feel free to reopen this bug. -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com