It seems that uclibc++ does not catch C++ exceptions. This problem is not specific to linknx ( e.g. in the 6th message of this discussion http://wl500g.info/archive/index.php/t-8456.html ).
To be sure that's the right problem, try to add flags="crwt" to the object configuration:
<object id="myobject" flags="crwt" >Test Object</object>
This should hide the problem, but this issue will probably cause other problems.
Perhaps you could tri to install another version of the uClibc++ library. Which version are you using? Did you install uclibc++ yourself? If yes, from where did you get it?
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@ #3: indeed similar symptoms. But I did not try to compile anything (frankly I was very happy I found all the necessary ipkgs so I didn't have to start figuring out how to do this compilation).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems you are using the right uClibc++ library. Sorry, but I don't see a solution for that problem. I know that some people use linknx on wl-500g but with OpenWRT firmware.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to setup linknx on my asus wl-500g (Oleg). So far I managed to get eibd up and running, but I can't get linknx to work.
I created a very simple config file called linknx_err.xml to nail down the problem, with the following content
<?xml version="1.0" ?>
<config>
<objects>
<object id="myobject" >Test Object</object>
</objects>
</config>
Then I run
linknx -config=/opt/share/data/linknx_err.xml
The result is
terminate called after throwing an instance of 'ticpp::Exception'
Any ideas what can be the problem here? I use linknx_0.0.1.27-2_mipsel.ipk
When I run linknx without config it does run. Also when I remove the <object> field from the config file it does not crash.
I've done an strace but that doesn't bring me much closer:
execve("/opt/bin/linknx", , ) = 0
old_mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa8000
stat("/opt/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=1837, …}) = 0
open("/opt/etc/ld.so.cache", O_RDONLY) = 3
old_mmap(NULL, 1837, PROT_READ, MAP_SHARED, 3, 0) = 0x2ab00000
close(3) = 0
open("/opt/lib/libpthsem.so.20", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\260)\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 151552, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad7000
old_mmap(0x2aad7000, 75740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aad7000
old_mmap(0x2aafa000, 1028, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x13000) = 0x2aafa000
old_mmap(0x2aafb000, 3572, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aafb000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libdl.so.0", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\360\7\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaa000
old_mmap(0x2aaaa000, 8024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aaaa000
old_mmap(0x2aabc000, 176, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2aabc000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libnsl.so.0", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p\3\0\0004\0\0\0"…, 4096) = 1628
old_mmap(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab01000
old_mmap(0x2ab01000, 936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab01000
old_mmap(0x2ab11000, 972, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab11000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libcurl.so.4", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000c\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 368640, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab12000
old_mmap(0x2ab12000, 295140, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab12000
old_mmap(0x2ab6a000, 4048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x48000) = 0x2ab6a000
old_mmap(0x2ab6b000, 608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab6b000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libm.so.0", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\25\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 126976, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab6c000
old_mmap(0x2ab6c000, 60176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab6c000
old_mmap(0x2ab8a000, 3216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x2ab8a000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libssl.so.0.9.7", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\20r\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 290816, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab8b000
old_mmap(0x2ab8b000, 212520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab8b000
old_mmap(0x2abcf000, 9400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x34000) = 0x2abcf000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libcrypto.so.0.9.7", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\300\2\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 1368064, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abd2000
old_mmap(0x2abd2000, 1212972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2abd2000
old_mmap(0x2ad0a000, 71372, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x128000) = 0x2ad0a000
old_mmap(0x2ad1c000, 13248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ad1c000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libuClibc++.so.0", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\323\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 270336, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad20000
old_mmap(0x2ad20000, 180972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ad20000
old_mmap(0x2ad5c000, 22492, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2c000) = 0x2ad5c000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libc.so.0", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\311\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 741376, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad62000
old_mmap(0x2ad62000, 645496, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ad62000
old_mmap(0x2ae10000, 4696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9e000) = 0x2ae10000
old_mmap(0x2ae12000, 19168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ae12000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libgcc_s.so.1", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p\27\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 126976, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae17000
old_mmap(0x2ae17000, 58164, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ae17000
old_mmap(0x2ae35000, 2296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x2ae35000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
open("/opt/lib/libz.so.1", O_RDONLY) = 3
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaa9000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\24\0\0004\0\0\0"…, 4096) = 4096
old_mmap(NULL, 163840, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae36000
old_mmap(0x2ae36000, 93956, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ae36000
old_mmap(0x2ae5d000, 536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x17000) = 0x2ae5d000
close(3) = 0
munmap(0x2aaa9000, 4096) = 0
munmap(0x2ab00000, 1837) = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo …}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo …}) = 0
brk(0) = 0x50fa50
brk(0x510a50) = 0x510a50
brk(0x511000) = 0x511000
brk(0x512000) = 0x512000
rt_sigaction(SIGPIPE, {0x10000000, ~, SA_NOCLDSTOP}, {SIG_DFL, , 0}, 16) = 0
pipe() = 3
fcntl(3, F_GETFL) = 0 (flags O_RDONLY)
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl(4, F_GETFL) = 0x1 (flags O_WRONLY)
fcntl(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
gettimeofday({1269624187, 784328}, NULL) = 0
brk(0x522000) = 0x522000
gettimeofday({1269624187, 788181}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, , , 16) = 0
rt_sigaction(SIGUSR1, {0x8000000, , SA_STACK|SA_INTERRUPT|SA_NOCLDWAIT|0x2acaf20}, {SIG_DFL, ~, 0}, 16) = 0
sigaltstatck({ss_sp=0x5114a8, ss_flags=0, ss_size=65536}, {ss_sp=0, ss_flags=SS_DISABLE, ss_size=0}) = 0
getpid() = 237
kill(237, SIGUSR1) = 0
rt_sigsuspend(~ <unfinished …>
-- SIGUSR1 (User defined signal 1) @ 0 (0) --
<… rt_sigsuspend resumed> ) = -1 EINTR (Interrupted system call)
sigreturn(sigreturn: PTRACE_GETREGS : Input/output error
sigreturn: PTRACE_GETREGS : Input/output error
) = -1 EINTR (Interrupted system call)
sigaltstatck(NULL, {ss_sp=0x5114a8, ss_flags=0, ss_size=65536}) = 0
sigaltstatck({ss_sp=0x5114a8, ss_flags=SS_DISABLE, ss_size=65536}, NULL) = 0
sigaltstatck(NULL, {ss_sp=0, ss_flags=SS_DISABLE, ss_size=0}) = 0
rt_sigaction(SIGUSR1, {SIG_DFL, ~, 0}, NULL, 16) = 0
rt_sigprocmask(SIG_SETMASK, , NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, NULL, , 16) = 0
rt_sigprocmask(SIG_SETMASK, , NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, NULL, , 16) = 0
rt_sigprocmask(SIG_SETMASK, , NULL, 16) = 0
gettimeofday({1269624187, 848222}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, NULL, , 16) = 0
rt_sigprocmask(SIG_SETMASK, , NULL, 16) = 0
rt_sigprocmask(SIG_SETMASK, ~, NULL, 16) = 0
gettimeofday({1269624187, 856144}, NULL) = 0
gettimeofday({1269624187, 857877}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, NULL, ~, 16) = 0
rt_sigprocmask(SIG_SETMASK, , NULL, 16) = 0
brk(0x523000) = 0x523000
open("/opt/share/data/linknx_err.xml", O_RDONLY) = 5
ioctl(5, TIOCNXCL, 0x7fff7a88) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x524000) = 0x524000
_llseek(5, 0, , SEEK_END) = 0
_llseek(5, 0, , SEEK_CUR) = 0
_llseek(5, 0, , SEEK_SET) = 0
read(5, "<?xml version=\"1.0\" ?>\r\n<config>"…, 130) = 130
close(5) = 0
write(2, "terminate called after throwing "…, 48terminate called after throwing an instance of ') = 48
write(2, "ticpp::Exception", 16ticpp::Exception) = 16
write(2, "'\n", 2'
) = 2
rt_sigprocmask(SIG_UNBLOCK, , NULL, 16) = 0
getpid() = 237
kill(237, SIGIOT) = 0
-- SIGIOT (Aborted) @ 0 (0) --
+++ killed by SIGIOT +++
Aborted
Hi,
It seems that uclibc++ does not catch C++ exceptions. This problem is not specific to linknx ( e.g. in the 6th message of this discussion http://wl500g.info/archive/index.php/t-8456.html ).
To be sure that's the right problem, try to add flags="crwt" to the object configuration:
<object id="myobject" flags="crwt" >Test Object</object>
This should hide the problem, but this issue will probably cause other problems.
Perhaps you could tri to install another version of the uClibc++ library. Which version are you using? Did you install uclibc++ yourself? If yes, from where did you get it?
Jean-François
I just remembered that the same problem was already discussed:
https://sourceforge.net/projects/linknx/forums/forum/743670/topic/3325010
Hi Jean-François,
Thanks for your quick response!
Adding the flag indeed hides the problem, as you expected.
The uClibc++ library installed is libuclibc++ - 0.2.2-5, which I found on http://www.ouaye.net/linknx/optware-oleg/test/
Any suggestions on another version I could try?
I
@ #3: indeed similar symptoms. But I did not try to compile anything (frankly I was very happy I found all the necessary ipkgs so I didn't have to start figuring out how to do this compilation).
It seems you are using the right uClibc++ library. Sorry, but I don't see a solution for that problem. I know that some people use linknx on wl-500g but with OpenWRT firmware.