Menu

Linknx(segmentation fault)

Help
robandrox
2007-12-19
2012-12-14
  • robandrox

    robandrox - 2007-12-19

    Hello,

    I have created the linknx package on my OpenWRT-SDK and now, when I execute it on my router(ASUS-WL500g),it returns the message "segmentation fault".What can be the reason?

     
    • jef2000

      jef2000 - 2007-12-19

      Hi,

      With so few information, I would reply "almost everything".
      What version of linknx, uclibc++, pthsem are you using?
      Which command line parameters are you using?
      Does it crash immediately or after a couple of seconds?
      Do you see any other messages on stdout before the crash?

      Kind regards,

      Jean-François

       
    • robandrox

      robandrox - 2007-12-19

      I've used  pthsem-2.0.7-2,uclibc++-0.2.2 and argp-1.3 to create the linknx package on the OpenWRT-SDK(I compiled uclibc++ as you told me in the openWRT forum).Do pthsem.ipk and arg.ipkg need to be installed on the router to execute linknx??

      I don't use any command line,I only write "linknx" to execute it.
      It crash inmediately and "segmentation default" is the only output message.

      Thanks

       
    • jef2000

      jef2000 - 2007-12-19

      pthsem and uclibc++ packages have to be installed on the router.
      You didn't tell which version of linknx you have compiled. Version 0.0.1.21 had a bug taht can cause a segmentation fault at startup in some cases (if you use that version, just try "linknx -w/tmp/config-out.xml")
      Too old version of uclibc++ (less than 0.2.0) can also cause segfault, but generally not at startup.

      If you still have problems, please send me the output of "ipkg list_installed" and "ldd linknx"

      Kr,

      Jean-François

       
    • robandrox

      robandrox - 2007-12-19

      I still have the same problem. The output of "ipkg list_installed" is:

      base-files - 8 -
      base-files-brcm - 2 - Board/architecture specific files
      bridge - 1.0.6-1 - Ethernet bridging tools
      busybox - 1.00-4 -
      dnsmasq - 2.33-1 -
      dropbear - 0.48.1-1 - a small SSH 2 server/client designed for small memory environments.
      e2fsprogs - 1.38-1 -
      eibd - 0.0.2.1-9 -
      fdisk - 2.12r-1 -
      haserl - 0.8.0-1 - a CGI wrapper to embed shell scripts in HTML documents
      ipkg - 0.99.149-2 - lightweight package management system
      iptables - 1.3.3-2 - The netfilter firewalling software for IPv4
      iwlib - 28.pre7-1 - Library for setting up WiFi cards using the Wireless Extension
      kernel - 2.4.30-brcm-4 -
      kmod-brcm-wl - 2.4.30-brcm-4 -
      kmod-diag - 2.4.30-brcm-5 - Kernel modules for LEDs and buttons
      kmod-ext2 - 2.4.30-brcm-5 - Kernel modules for EXT2 filesystem support
      kmod-usb-core - 2.4.30-brcm-5 - Kernel Support for USB
      kmod-usb-ohci - 2.4.30-brcm-5 - Kernel driver for OHCI USB controllers
      kmod-usb-serial - 2.4.30-brcm-5 - Kernel Support for USB-to-Serial converters
      kmod-usb-serial-pl2303 - 2.4.30-brcm-5 - Kernel Support for Prolific PL2303 USB-to-Serial converters
      kmod-usb-storage - 2.4.30-brcm-5 - Kernel modules for USB storage support
      kmod-usb-uhci-iv - 2.4.30-brcm-5 - Kernel driver for Intel/VIA UHCI USB controllers
      kmod-usb2 - 2.4.30-brcm-5 - Kernel driver for USB2 controllers
      kmod-vfat - 2.4.30-brcm-5 - Kernel modules for VFAT filesystem support
      kmod-wlcompat - 2.4.30-brcm-4 - Compatibility module for using the Wireless Extension with broadcom's wl
      libgcc - 3.4.4-9 - GCC support library
      libusb - 0.1.10a-1 - a Library for accessing Linux USB devices
      linknx - 0.0.1.17-1 -
      lsusb - 0.71-1 - A program to list USB devices
      mtd - 4 -
      nvram - 1 - NVRAM utility and libraries for Broadcom hardware
      openssh-sftp-server - 4.4p1-1 - OpenSSH SFTP server
      pthsem - 2.0.7-2 -
      uclibc - 0.9.27-9 - Standard C library for embedded Linux systems
      uclibc++ - 0.2.2-1 -
      webif - 0.2-1 - A modular, extensible web interface for OpenWrt.
      wificonf - 6 - Replacement utility for wlconf
      wireless-tools - 28.pre7-1 - Tools for setting up WiFi cards using the Wireless Extension

      And the output of "ldd linknx" is:

      libuClibc++.so.0 => /usr/lib/libuClibc++.so.0 (0x2aaee000)
              libc.so.0 => /lib/libc.so.0 (0x2ab5a000)
              libm.so.0 => /lib/libm.so.0 (0x2ac00000)
              libpthsem.so.20 => /usr/lib/libpthsem.so.20 (0x2ac47000)
              libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2ac9a000)
              ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)

       
    • jef2000

      jef2000 - 2007-12-20

      And what does happen if you execute "linknx -h"? Does it display help message? Crash before? After?

       
    • robandrox

      robandrox - 2007-12-20

      If I execute "linknx -h" it doesn't display help messege,the output is the same:"segmentation default"

       
    • jef2000

      jef2000 - 2007-12-28

      Hi,

      Is your problem solved?
      If not, you can perhaps try to get some info from the core dump.
      You first have to allow core-dump to be generated with the following command:
      ulimit -c unlimited
      Then cd to the directory where the core dump must be written (I guess you don't want it to be written on the router's flash) and run linknx.
      After that, you can analyze the core dump on your PC with commands similar to this:
      # cd /path/to/myprog/src
      # /path/to/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/mipsel-linux-uclibc-gdb ./myprog
      gdb> set solib-absolute-prefix /path/to/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel
      gdb> target core /path/to/core.xxxx

      I didn't try it, but some people used it successfully.

      Kr,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.