SIGBUS in Apache (Mysql client) - Debian

This is a discussion on SIGBUS in Apache (Mysql client) - Debian ; I thought I'd tripple check all my machines because of the SSL problem reported yesterday. Noticed that I was running Sarge (!!) on some machines. Quickly started a dist-upgrade, which finnished quite late (or early depending of view . All ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: SIGBUS in Apache (Mysql client)

  1. SIGBUS in Apache (Mysql client)

    I thought I'd tripple check all my machines because
    of the SSL problem reported yesterday. Noticed that
    I was running Sarge (!!) on some machines.

    Quickly started a dist-upgrade, which finnished quite
    late (or early depending of view .

    All my services work fine, exept PHPBB2/Apache...

    A backtrace when starting 'apache -X' shows:

    ----- s n i p -----
    #0 0xf73f76e4 in _nss_files_endhostent () from /lib/libnss_files.so.2
    #1 0xf73f8048 in _nss_files_gethostbyname_r () from /lib/libnss_files.so.2
    #2 0xf7cd7914 in gethostbyname_r () from /lib/libc.so.6
    #3 0xf682c0d4 in my_gethostbyname_r () from /usr/lib/libmysqlclient.so.15
    #4 0xf68497f0 in mysql_real_connect () from /usr/lib/libmysqlclient.so.15
    #5 0xf69c399c in zif_mysql_errno () from /usr/lib/php4/20050606+lfs/mysql.so
    #6 0xf78ffef8 in execute () from /usr/lib/apache/1.3/libphp4.so
    #7 0xf78fa474 in execute () from /usr/lib/apache/1.3/libphp4.so
    #8 0xf78fc7dc in execute () from /usr/lib/apache/1.3/libphp4.so
    #9 0xf78fc7dc in execute () from /usr/lib/apache/1.3/libphp4.so
    #10 0xf78e6bc8 in zend_execute_scripts () from /usr/lib/apache/1.3/libphp4.so
    #11 0xf78b4cb0 in php_execute_script () from /usr/lib/apache/1.3/libphp4.so
    #12 0xf79039f0 in apache_php_module_main () from /usr/lib/apache/1.3/libphp4.so
    #13 0xf790494c in apache_php_module_main () from /usr/lib/apache/1.3/libphp4.so
    #14 0xf7904be0 in apache_php_module_main () from /usr/lib/apache/1.3/libphp4.so
    #15 0x0001e9e8 in ap_invoke_handler ()
    #16 0x0002fa88 in ap_die ()
    #17 0xf7b4cb70 in ?? () from /usr/lib/apache/1.3/mod_dir.so
    #18 0xf7b4cb70 in ?? () from /usr/lib/apache/1.3/mod_dir.so
    Previous frame identical to this frame (corrupt stack?)
    ----- s n i p -----

    To me, it looks like it's a problem in the NSS stack... !?

    Quickly setting up Apache2 didn't work either:

    ----- s n i p -----
    #0 0xf7b0f608 in readv () from /lib/libc.so.6
    #1 0xf7c8f160 in apr_socket_sendv () from /usr/lib/libapr-1.so.0
    #2 0x0003910c in ap_bucket_eoc_create ()
    #3 0x00039c24 in ap_core_output_filter ()
    #4 0x00044128 in ap_pass_brigade ()
    #5 0x00044128 in ap_pass_brigade ()
    #6 0x0004c1f4 in ap_http_chunk_filter ()
    #7 0x00044128 in ap_pass_brigade ()
    #8 0x00044128 in ap_pass_brigade ()
    #9 0x00030530 in ap_content_length_filter ()
    #10 0x00044128 in ap_pass_brigade ()
    #11 0x00044128 in ap_pass_brigade ()
    #12 0x0004a18c in ap_process_request ()
    #13 0x0004731c in ap_register_input_filter ()
    #14 0x0004135c in ap_run_process_connection ()
    #15 0x0004de28 in ap_graceful_stop_signalled ()
    #16 0x0004de28 in ap_graceful_stop_signalled ()
    Previous frame identical to this frame (corrupt stack?)
    ----- s n i p -----

    ALSO libc!


    I'm a little tired after only sleeping 3-4 hours this
    morning, so any ideas?


    This is a SPARC64, kernel 2.6.20.3 (from kernel-image-2.6.20.3-sparc64).

    Here's nsswitch.conf if that matters:
    ----- s n i p -----
    passwd: files
    group: files
    shadow: files
    hosts: files dns [!UNAVAIL=return]
    networks: files
    protocols: db files
    services: db files
    ethers: db files
    rpc: db files
    netgroup: nis
    ----- s n i p -----

    Using strace:

    ----- s n i p -----
    [...]
    read(30, "127.0.0.1\tlocalhost.localdomain\tlocalhost\n\t\t\n\n# The following lines are desirable for IPv6 capable hosts\n#::1 ip6-localhost ip6-loopback\n#fe00::0 ip6-localnet\n#ff00::0 ip6-mcastprefix\n#ff02::1 ip6-allnodes\n#ff02::2 ip6-allrouters\n#ff02::3 ip6-allhosts\n", 4096) = 290
    --- SIGBUS (Bus error) @ 0 (0) ---
    +++ killed by SIGBUS +++
    Process 22778 detached
    ----- s n i p -----


    The weird thing is that it seem to only affect
    phpbb2 (via MySQL). I'm also running (amongst other
    things) phpAlbum (http://www.phpalbum.net/) which
    is a 'simple' PHP site (i.e. no MySQL or other modules
    involved). In total, there's 24 VirtualHost directives,


    Testing through all sites, I also get the bus error
    when accessing the Anthill (http://freshmeat.net/projects/anthill/).
    Same bt as above...


    Trying to setup a very simple php5-mysql test shows
    that the problem seems to bee in the mysql library.

    ----- s n i p -----
    root@rigel# strace mysql -h
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7fc4000
    read(4, "127.0.0.1\tlocalhost.localdomain\t"..., 4096) = 290
    --- SIGBUS (Bus error) @ 0 (0) ---
    +++ killed by SIGBUS +++
    ----- s n i p -----

    There is no problem with the MySQL server (v5.0.32-7etch5),
    since I can access and administrate it from localhost
    on MYSQL_SERVER...
    However, I have three SPARC64 (one of which is MYSQL_SERVER)
    and two i386. On both the i386 mysql works (same version),
    but on the two other SPARC64's I get a Bus error!


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. SEMI-SOLVED (Was: SIGBUS in Apache (Mysql client))

    >>>>> "Turbo" == Turbo Fredriksson writes:

    Turbo> To me, it looks like it's a problem in the NSS stack... !?

    Problem seems weirder than this! I changed 'hosts: files ...' to 'hosts: compat ...'
    in nsswitch.conf and apache started working. But then my spamassassin setup
    stoped working:

    ----- s n i p -----
    root@aurora# ping localhost
    ping: unknown host localhost
    root@aurora# ping localhost.
    PING localhost (127.0.0.1) 56(84) bytes of data.
    64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.292 ms
    64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.250 ms

    --- localhost ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1010ms
    rtt min/avg/max/mdev = 0.250/0.271/0.292/0.021 ms
    root@aurora# head -n1 /etc/hosts
    127.0.0.1 localhost
    root@aurora# grep ^host /etc/nsswitch.conf
    hosts: compat dns [!UNAVAIL=return]
    ----- s n i p -----


    But if I put 'files' back, then I can't login (via krb5-telnetd)!
    --
    SEAL Team 6 Noriega Kennedy attack colonel South Africa explosion
    Soviet Panama munitions Honduras Marxist Treasury Mossad domestic
    disruption
    [See http://www.echelonwatch.org/ for more about this]
    http://www.theregister.co.uk/2001/09...spying_report/
    http://www.aclu.org/safefree/nsaspyi...1.html#echelon


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Plot thickens (Was: SEMI-SOLVED (Was: SIGBUS in Apache (Mysql client)))

    Quoting Turbo Fredriksson :

    >>>>>> "Turbo" == Turbo Fredriksson writes:

    >
    > Turbo> To me, it looks like it's a problem in the NSS stack... !?
    >
    > Problem seems weirder than this! I changed 'hosts: files ...' to 'hosts: compat ...'
    > in nsswitch.conf and apache started working. But then my spamassassin setup
    > stoped working:
    >
    > ----- s n i p -----
    > root@aurora# ping localhost
    > ping: unknown host localhost
    > root@aurora# ping localhost.
    > PING localhost (127.0.0.1) 56(84) bytes of data.
    > 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.292 ms
    > 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.250 ms
    >
    > --- localhost ping statistics ---
    > 2 packets transmitted, 2 received, 0% packet loss, time 1010ms
    > rtt min/avg/max/mdev = 0.250/0.271/0.292/0.021 ms
    > root@aurora# head -n1 /etc/hosts
    > 127.0.0.1 localhost
    > root@aurora# grep ^host /etc/nsswitch.conf
    > hosts: compat dns [!UNAVAIL=return]
    > ----- s n i p -----
    >
    >
    > But if I put 'files' back, then I can't login (via krb5-telnetd)!


    It seems like anytime I involve the DNS, telnet/telnetd stop working...

    ----- s n i p -----
    root@rigel# cat /etc/host.conf
    order hosts
    multi on
    root@rigel# cat /etc/hosts
    127.0.0.1 localhost
    root@rigel# cat /etc/resolv.conf
    search
    nameserver 127.0.0.1
    root@rigel# grep ^host /etc/nsswitch.conf
    hosts: files
    root@rigel# ping -c 1 localhost
    PING localhost (127.0.0.1) 56(84) bytes of data.
    64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.102 ms

    --- localhost ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 0.102/0.102/0.102/0.000 ms
    root@rigel# ping -c 1 www.telia.se
    ping: unknown host www.telia.se
    ----- s n i p -----

    Here everything (but the last ping - obviously) works exactly as
    expected. But if I put back 'order hosts,bind' and 'hosts: files dns'
    respectivly:

    ----- s n i p -----
    root@rigel# ping -c 1 localhost
    PING localhost (127.0.0.1) 56(84) bytes of data.
    64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.149 ms

    --- localhost ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 0.149/0.149/0.149/0.000 ms
    root@rigel# ping -c 1 www.telia.se
    PING www.telia.se (193.44.158.232) 56(84) bytes of data.
    64 bytes from www.telia.se (193.44.158.232): icmp_seq=1 ttl=245 time=43.6 ms

    --- www.telia.se ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 43.649/43.649/43.649/0.000 ms
    ----- s n i p -----

    ... but I can't telnet into the machine:

    ----- s n i p -----
    [pumba.pts/9]$ telnet -axl root rigel
    Trying ...
    Connected to ().
    Escape character is '^]'.
    Waiting for encryption to be negotiated...

    Encryption could not be enabled. Good-bye.
    ----- s n i p -----


    --
    To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread