Bug 30638 - crashes during work because no libgcc_s in /var/empty
Summary: crashes during work because no libgcc_s in /var/empty
Status: NEW
Alias: None
Product: Branch t6
Classification: Distributions
Component: pdnsd (show other bugs)
Version: не указана
Hardware: all Linux
: P3 critical
Assignee: Nobody's working on this, feel free to take it
QA Contact: QA t6
URL:
Keywords:
Depends on: 30640
Blocks:
  Show dependency tree
 
Reported: 2015-01-11 00:47 MSK by Ivan Zakharyaschev
Modified: 2019-09-29 21:10 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2015-01-11 00:47:38 MSK
pdns-1.2.7 crashes some time after the start because libgcc_s is missing in /var/empty (its chroot). Its error message before dying is:

libgcc_s.so.1 must be installed for pthread_cancel to work

Here are some last messages from running: 

strace -e trace=file -fF pdnsd -g -v3 --config-file /etc/pdnsd.conf -p /var/run/pdnsd.pid

52 01/11 00:44:00| Using cached record.
52 01/11 00:44:00| Starting cached resolve for: ibigdan.livejournal.com., query AAAA
52 01/11 00:44:00| Record found in cache for ibigdan.livejournal.com.
52 01/11 00:44:00| Requery decision: dflags=0, cflags=0, req=0, neg=0, timed=1, timestamp=0
52 01/11 00:44:00| Trying name servers.
52 01/11 00:44:00| Sending query to 174.35.55.22
52 01/11 00:44:00| Sending query to 66.114.55.22
52 01/11 00:44:00| Caching type AAAA for domain ibigdan.livejournal.com. negative with ttl 600
52 01/11 00:44:00| Query to 174.35.55.22 succeeded.
52 01/11 00:44:00| Outbound msg len 103, tc=0, rc="no error"
52 01/11 00:44:00| Answering to: 192.168.1.13, source address: 192.168.1.2
Process 6227 detached
4 01/11 00:44:11| No query succeeded. Returning error code "server failed"
4 01/11 00:44:11| Outbound msg len 46, tc=0, rc="server failed"
4 01/11 00:44:11| Answering to: 192.168.1.13, source address: 192.168.1.2
Process 6177 detached
6 01/11 00:44:22| No query succeeded. Returning error code "server failed"
6 01/11 00:44:22| Outbound msg len 58, tc=0, rc="server failed"
6 01/11 00:44:22| Answering to: 192.168.1.13, source address: 192.168.1.2
Process 6179 detached
Process 6228 attached (waiting for parent)
Process 6228 resumed (parent 6173 ready)
53 01/11 00:44:22| Received query.
53 01/11 00:44:22| Bad rcode(2).
[pid  6228] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/tls/i686/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/tls/i686/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/tls/i686/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/tls/i686", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/tls/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/tls/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/tls", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/i686/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/i686/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/i686/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/i686", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/lib", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
[pid  6228] open("/usr/lib/tls/i686/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/tls/i686/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/tls/i686/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/tls/i686", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/tls/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/tls/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/tls", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/i686/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/i686/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/i686/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/i686", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/sse2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib/sse2", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  6228] stat64("/usr/lib", 0xb61feb90) = -1 ENOENT (No such file or directory)
[pid  6228] open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
libgcc_s.so.1 must be installed for pthread_cancel to work
[pid  6228] --- SIGABRT (Aborted) @ 0 (0) ---
Process 6228 detached
[pid  6209] +++ killed by SIGABRT +++
Process 6209 detached
[pid  6172] +++ killed by SIGABRT +++
Process 6172 detached
[pid  6171] +++ killed by SIGABRT +++
Process 6171 detached
[pid  6173] +++ killed by SIGABRT +++
Process 6173 detached
+++ killed by SIGABRT +++
Process 6169 detached
Aborted (core dumped)
[root@localhost ~]# 

This dependency is not detectable, at least the following way:

[root@localhost ~]# ldd -r /usr/sbin/pdnsd
	linux-gate.so.1 (0xb7f7d000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb7f43000)
	libc.so.6 => /lib/libc.so.6 (0xb7dcc000)
	/lib/ld-linux.so.2 (0xb7f7e000)
[root@localhost ~]# ldd -r /lib/libpthread.so.0
	linux-gate.so.1 (0xb7f4c000)
	libc.so.6 => /lib/libc.so.6 (0xb7d9b000)
	/lib/ld-linux.so.2 (0xb7f4d000)
[root@localhost ~]# ldd -r /lib/libc.so.6
	/lib/ld-linux.so.2 (0xb7f32000)
	linux-gate.so.1 (0xb7f31000)
[root@localhost ~]# 


Perhaps, it's a problem of libc or libpthread (so that they are not immediately linked with libgcc_s, and hence crash in an empty chroot), or a problem of pdnsd's chroot configuration (it shouldn't be empty).
Comment 1 Ivan Zakharyaschev 2015-01-11 00:58:48 MSK
Similar cases:

https://bugzilla.altlinux.org/show_bug.cgi?id=9958
https://bugzilla.altlinux.org/show_bug.cgi?id=29001
https://bugzilla.altlinux.org/show_bug.cgi?id=25280

Can't this dependency brought onto surface automatically, and laoding it or copying into the chroot made automatically?

Well, in case of pdnsd the chroot is /var/empty/ and it is supposed to be empty, so this contradicts the need to copy a library...
Comment 2 Vyacheslav Dikonov 2019-09-29 18:45:45 MSK
В Сизифе теперь тоже падает pdnsd с сообщением в логе.


pdnsd[1220]: segfault at 0 ip 0000003a50a77de1 sp 00007ffdca940d90 error 4 in libc-2.27.so[3a50a22000+146000]

Может быть это тоже самое.