Thanks.  Loading busybox-static-dbgsym and retracing this with gdb, I
see the following backtrace:

(gdb) thread apply all bt full

Thread 1 (Thread 0x11bb880 (LWP 31592)):
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00007f601bb0af90 in __pthread_initialize_minimal_internal ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#2  0x00007f601bb0a571 in _init () from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#3  0x00007f601c358f70 in ?? ()
No symbol table info available.
#4  0x00000000004f147a in call_init.part ()
No symbol table info available.
#5  0x00000000004f1635 in _dl_init ()
No symbol table info available.
#6  0x00000000004e3a46 in dl_open_worker ()
No symbol table info available.
#7  0x00000000004e11f4 in _dl_catch_error ()
No symbol table info available.
#8  0x00000000004e33b9 in _dl_open ()
No symbol table info available.
#9  0x000000000049ff22 in do_dlopen ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#10 0x00000000004e11f4 in _dl_catch_error ()
No symbol table info available.
#11 0x00000000004a010e in __libc_dlopen_mode ()
No symbol table info available.
#12 0x0000000000493aa8 in __nss_next2 ()
No symbol table info available.
#13 0x000000000048b310 in gethostbyaddr_r ()
No symbol table info available.
#14 0x000000000048d158 in gni_host_inet_name.isra ()
No symbol table info available.
#15 0x000000000048d752 in getnameinfo ()
No symbol table info available.
#16 0x000000000058c312 in sockaddr2str (sa=0x11bdc50, flags=flags@entry=10)
    at libbb/xconnect.c:439
        host = "8.8.8.8\000\000\334\033\001", '\000' <repeats 20 times>, 
"\350\003\000\000\000\000\000\000\261tB\000\000\000\000\000\002\000\000\000\000\000\000\000\b\000\000\000\000\000\000\000\240\064\203\230\377\177\000\000\372\316B\000\000\000\000\000\003\000\000\000\000\000\000\000\240\064\203\230\377\177\000\000\220\064\203\230\377\177\000\000\372\235O\000\000\000\000\000\003\000\000\000\000\000\000\000K\303X\000\000\000\000"
        serv = "0\000\000\000\000\000\000\000\000K~\000\000\000\000"
        rc = <optimized out>
        salen = <optimized out>
---Type <return> to continue, or q <return> to quit---
#17 0x000000000058caf0 in xmalloc_sockaddr2hostonly_noport (sa=<optimized out>)
    at libbb/xconnect.c:476
No locals.
#18 0x000000000050eb64 in print_host (hostname=<optimized out>, 
    header=header@entry=0x5c187f "Server:") at networking/nslookup.c:92
        dotted = 0x11be080 "8.8.8.8"
        revhost = <optimized out>
        cur = 0x11bdc20
        cnt = 0
        result = 0x11bdc20
        rc = 0
        hint = {ai_flags = 0, ai_family = 0, ai_socktype = 1, ai_protocol = 0, 
          ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
#19 0x000000000050ec15 in server_print () at networking/nslookup.c:129
        server = <optimized out>
        sa = <optimized out>
#20 nslookup_main (argc=<optimized out>, argv=0x7fff988337a0)
    at networking/nslookup.c:189
No locals.
#21 0x00000000004f890e in run_applet_no_and_exit (applet_no=<optimized out>, 
    argv=argv@entry=0x7fff988337a0) at libbb/appletlib.c:759
        argc = <optimized out>
#22 0x00000000004f8aa8 in run_applet_and_exit (name=0x7fff988344df "nslookup", 
---Type <return> to continue, or q <return> to quit---
    argv=argv@entry=0x7fff988337a0) at libbb/appletlib.c:766
        applet = <optimized out>
#23 0x00000000004f8d19 in busybox_main (argv=0x7fff988337a0)
    at libbb/appletlib.c:728
No locals.
#24 run_applet_and_exit (name=<optimized out>, argv=argv@entry=0x7fff98833798)
    at libbb/appletlib.c:768
        applet = <optimized out>
#25 0x00000000004f8ede in main (argc=<optimized out>, argv=0x7fff98833798)
    at libbb/appletlib.c:823
No locals.
(gdb)

I think this may map to
https://errors.ubuntu.com/problem/c7906cb4fb8d9ab7fa9b995d00b3565b2eddccd4
on the error tracker, which interestingly enough is reported only on
17.04 (zesty).

The stack trace points into the NSS modules used behind
gethostbyaddr_r().  I'm unclear why the nslookup tool would be using
NSS, but maybe we can understand the bug better by looking at this.  Can
you attach the /etc/nsswitch.conf file from the affected system?

Can you also confirm the version of the libc6 package you have installed
when this happens?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to busybox in Ubuntu.
https://bugs.launchpad.net/bugs/1723956

Title:
  busybox-static: several network applets segfaulting

Status in busybox package in Ubuntu:
  Incomplete

Bug description:
  On a fully up-to-date Ubuntu 17.04, running most applets from busybox-
  static that are network-related lead to a segfault. Example:

  $ busybox nslookup google.com 8.8.8.8
  Server:    8.8.8.8
  Segmentation fault

  $ busybox        
  BusyBox v1.22.1 (Ubuntu 1:1.22.0-19ubuntu2) multi-call binary.
  [...]

  $ apt-cache policy busybox
  busybox:
    Installed: (none)
    Candidate: 1:1.22.0-19ubuntu2
    Version table:
       1:1.22.0-19ubuntu2 500
          500 http://ftp.fau.de/ubuntu zesty/universe amd64 Packages

  $ dpkg -S /bin/busybox 
  busybox-static: /bin/busybox

  $ apt-cache policy busybox-static
  busybox-static:
    Installed: 1:1.22.0-19ubuntu2
    Candidate: 1:1.22.0-19ubuntu2
    Version table:
   *** 1:1.22.0-19ubuntu2 500
          500 http://ftp.fau.de/ubuntu zesty/main amd64 Packages
          100 /var/lib/dpkg/status


  This even happens when passing invalid domains or DNS servers to use
  that don't actually run any DNS service. (like "busybox nslookup
  google.com 1.2.3.4" or "busybox nslookup bar.foof00 8.8.8.8"), so it
  seems to be early in the network setup.

  I could not reproduce the problem on the very same system when compiling 
stock busybox 1.22.1 (why even? we're at 1.27.x!) myself, neither with a recent 
git clone. Also two VMs I had at hand running Ubuntu 14.04 and 16.04 didn't 
show this problem with busybox-static. Installing the package "busybox" (which 
removes busybox-static) fixes the problem on 17.04.
  The only thing that might be related in any way about my system is that it 
has no IPv6 connectivity (apart from the link-local address).

  I also sent a crash report when the apport window popped up, but I
  have no idea where this ends up and how to add further information,
  hence this report here. Please let me know if this seemingly trivial
  bug cannot be reproduced instantly, so I can try to assist with
  further information.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1723956/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to