Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1283284 - f24 glibc makes llvm-tblgen throw an assertion
Summary: f24 glibc makes llvm-tblgen throw an assertion
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 24
Hardware: s390
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: glibc team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2015-11-18 15:25 UTC by Dan Horák
Modified: 2017-08-08 12:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 12:25:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dan Horák 2015-11-18 15:25:43 UTC
llvm-3.7.0-1.fc24 build fails on 32-bit s390 with an assertion in llvm-tlbgen

from build.log
...
llvm[2]: ======= Finished Linking Release Executable llvm-tblgen
make[2]: Leaving directory '/builddir/build/BUILD/llvm-3.7.0.src/build/utils/TableGen'
make[1]: Leaving directory '/builddir/build/BUILD/llvm-3.7.0.src/build/utils'
make[1]: Entering directory '/builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR'
/builddir/build/BUILD/llvm-3.7.0.src/autoconf/mkinstalldirs /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release > /dev/null
/builddir/build/BUILD/llvm-3.7.0.src/autoconf/mkinstalldirs /builddir/build/BUILD/llvm-3.7.0.src/build/include/llvm/IR > /dev/null
/builddir/build/BUILD/llvm-3.7.0.src/autoconf/mkinstalldirs /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/./ > /dev/null
/usr/bin/date > /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/.dir
/usr/bin/date > /builddir/build/BUILD/llvm-3.7.0.src/build/include/llvm/IR/.dir
/usr/bin/date > /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/.//.dir
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
/builddir/build/BUILD/llvm-3.7.0.src/build/Release/bin/llvm-tblgen -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/IR -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/Target  /builddir/build/BUILD/llvm-3.7.0.src/include/llvm/IR/Intrinsics.td -o  /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp -gen-intrinsic
llvm-tblgen: cxa_atexit.c:100: __new_exitfn: Assertion `l != ((void *)0)' failed.
Makefile:23: recipe for target '/builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp' failed
make[1]: *** [/builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp] Aborted
make[1]: *** Deleting file '/builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp'
make[1]: Leaving directory '/builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR'
/builddir/build/BUILD/llvm-3.7.0.src/Makefile.rules:880: recipe for target 'all' failed
make: *** [all] Error 1


for full logs please see http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1986909

After downgrading the F-24 buildroot to F-23 glibc (glibc-2.22-3.fc23) the build runs well. Also the same llvm-3.7.0-1.fc23 was built sucessfully under F-23.

Version-Release number of selected component (if applicable):
glibc-2.22.90-3.fc24.s390

Comment 1 Dan Horák 2015-11-20 09:56:24 UTC
backtrace obtained from a standalone run of the tblgen tool

sh-4.3# gdb /builddir/build/BUILD/llvm-3.7.0.src/build/Release/bin/llvm-tblgen  core.61038 
GNU gdb (GDB) Fedora 7.9.90.20150717-12.fc24
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "s390-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /builddir/build/BUILD/llvm-3.7.0.src/build/Release/bin/llvm-tblgen...done.
[New LWP 61038]

warning: Could not load shared library symbols for linux-vdso32.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `/builddir/build/BUILD/llvm-3.7.0.src/build/Release/bin/llvm-tblgen -I /builddir'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7cf9d298 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
55	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) where
#0  0x7cf9d298 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x7cf9ea76 in __GI_abort () at abort.c:89
#2  0x7cf957d8 in __assert_fail_base (fmt=0x7d0c2274 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7d0c23e2 "l != ((void *)0)", 
    file=0x7d0c23d4 "cxa_atexit.c", line=100, function=<optimized out>) at assert.c:92
#3  0x7cf95860 in __GI___assert_fail (assertion=0x7d0c23e2 "l != ((void *)0)", file=0x7d0c23d4 "cxa_atexit.c", line=100, 
    function=0x7d0c23f4 <__PRETTY_FUNCTION__.6653> "__new_exitfn") at assert.c:101
#4  0x7cfa05fc in __new_exitfn (listp=0x7d0fa4e4 <__exit_funcs>) at cxa_atexit.c:100
#5  0x7cfa0688 in __internal_atexit (listp=0x7d0fa4e4 <__exit_funcs>, d=0x55d20528, arg=0x55d24c20 <llvm::errs()::S>, 
    func=0x55cbb9f8 <llvm::raw_fd_ostream::~raw_fd_ostream()>) at cxa_atexit.c:35
#6  __GI___cxa_atexit (func=0x55cbb9f8 <llvm::raw_fd_ostream::~raw_fd_ostream()>, arg=0x55d24c20 <llvm::errs()::S>, d=0x55d20528) at cxa_atexit.c:58
#7  0x55cbce12 in llvm::errs () at /builddir/build/BUILD/llvm-3.7.0.src/lib/Support/raw_ostream.cpp:731
#8  0x55cb380c in PrintStackTraceSignalHandler () at /builddir/build/BUILD/llvm-3.7.0.src/lib/Support/Unix/Signals.inc:494
#9  0x55cb1e40 in SignalHandler () at /builddir/build/BUILD/llvm-3.7.0.src/lib/Support/Unix/Signals.inc:211
#10 <signal handler called>
#11 __GI__IO_wsetb (f=f@entry=0x7d0fa7d0 <_IO_stdin_>, b=b@entry=0x0, eb=eb@entry=0x0, a=a@entry=0) at wgenops.c:113
#12 0x7cfe3d60 in _IO_unbuffer_all () at genops.c:983
#13 _IO_cleanup () at genops.c:1025
#14 0x7cfa037a in __run_exit_handlers (status=0, listp=0x7d0fa4e4 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:95
#15 0x7cfa0420 in __GI_exit (status=<optimized out>) at exit.c:104
#16 0x7cf877ac in __libc_start_main (main=0x55b808e0 <main()>, argc=13, argv=0x7fedb224, init=<optimized out>, fini=0x55cd30b8 <__libc_csu_fini>, 
    rtld_fini=0x7d2400e8 <_dl_fini>, stack_end=0x7fedb1b8) at libc-start.c:323
#17 0x55b823f6 in _start ()

Comment 2 Dan Horák 2015-11-20 09:58:04 UTC
and running under gdb directly gives

(gdb) set args -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/IR -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/Target  /builddir/build/BUILD/llvm-3.7.0.src/include/llvm/IR/Intrinsics.td -o  /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp -gen-intrinsic
(gdb) run
Starting program: /builddir/build/BUILD/llvm-3.7.0.src/build/Release/bin/llvm-tblgen -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/IR -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/include -I  /builddir/build/BUILD/llvm-3.7.0.src/lib/Target  /builddir/build/BUILD/llvm-3.7.0.src/include/llvm/IR/Intrinsics.td -o  /builddir/build/BUILD/llvm-3.7.0.src/build/lib/IR/Release/Intrinsics.gen.tmp -gen-intrinsic
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__GI__IO_wsetb (f=f@entry=0x7dea67d0 <_IO_stdin_>, b=b@entry=0x0, eb=eb@entry=0x0, a=a@entry=0) at wgenops.c:113
113	  if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
(gdb) where
#0  __GI__IO_wsetb (f=f@entry=0x7dea67d0 <_IO_stdin_>, b=b@entry=0x0, eb=eb@entry=0x0, a=a@entry=0) at wgenops.c:113
#1  0x7dd8fd60 in _IO_unbuffer_all () at genops.c:983
#2  _IO_cleanup () at genops.c:1025
#3  0x7dd4c37a in __run_exit_handlers (status=0, listp=0x7dea64e4 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:95
#4  0x7dd4c420 in __GI_exit (status=<optimized out>) at exit.c:104
#5  0x7dd337ac in __libc_start_main (main=0x5555f8e0 <main()>, argc=13, argv=0x7ffff5f4, init=<optimized out>, fini=0x556b20b8 <__libc_csu_fini>, 
    rtld_fini=0x7dfec0e8 <_dl_fini>, stack_end=0x7ffff588) at libc-start.c:323
#6  0x555613f6 in _start ()

Comment 3 Florian Weimer 2015-11-23 20:46:27 UTC
Could be related to bug 1264556.

Comment 4 Dan Horák 2015-12-17 10:53:47 UTC
seen in llvm33, llvm34 and llvm35 builds too

Comment 5 Florian Weimer 2016-01-11 12:43:30 UTC
Does the problem persist with current rawhide glibc?  Thanks.

Comment 6 Dan Horák 2016-01-11 13:29:10 UTC
it does - http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2050787 - with glibc-2.22.90-26.fc24.s390

Comment 7 Carlos O'Donell 2016-01-11 22:06:29 UTC
Is llvm-tlbgen threaded?

This is likely upstream bug 14622.

https://sourceware.org/bugzilla/show_bug.cgi?id=14622

The GNU C Library always took the position that when the application called exit() it was done doing everything else it needed to do and that shutdown should happen immediately.

This has been less and less true, and there are other open bugs indicating this also. As we run more jobs concurrenctly, we might be racing against exit(), which is required to be MT-safe.

This needs to be fixed upstream. As a workaround the program can coordinate shutdown before calling exit().

Comment 8 Carlos O'Donell 2016-01-11 22:07:47 UTC
(In reply to Carlos O'Donell from comment #7)
> Is llvm-tlbgen threaded?
> 
> This is likely upstream bug 14622.
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=14622
> 
> The GNU C Library always took the position that when the application called
> exit() it was done doing everything else it needed to do and that shutdown
> should happen immediately.
> 
> This has been less and less true, and there are other open bugs indicating
> this also. As we run more jobs concurrenctly, we might be racing against
> exit(), which is required to be MT-safe.
> 
> This needs to be fixed upstream. As a workaround the program can coordinate
> shutdown before calling exit().

As a warning: When we fix this upstream, user programs will be faced with potential deadlocks if they do not avoid coordinating writing to FILE* streams >:-)

Comment 9 Jan Kurik 2016-02-24 13:59:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 10 Fedora End Of Life 2017-07-25 19:31:18 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2017-08-08 12:25:48 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.