terminate called after throwing an instance of 'Exception'

Bug #339872 reported by Vovka
2
Affects Status Importance Assigned to Milestone
DC++
Medium
Steven Sheehy
LinuxDC++
High
Unassigned

Bug Description

this is what I've got at my terminal:

Loading: Hash database
Loading: Shared Files
Loading: Download Queue
and, after awhile, this:
terminate called after throwing an instance of 'Exception'
Aborted

Related branches

Revision history for this message
Razzloss (razzloss) wrote :

Great... Please describe in more detail.

Is that all that there was or did you decide to leave something out? Does the application window appear at all? If yes, what were you doing when that happened (==> steps to reproduce). And what distribution and linuxdcpp version?

--RZ

Changed in linuxdcpp:
status: New → Incomplete
Revision history for this message
Vovka (my-favourwork) wrote :

oh, sorry. this one is linux version installed out off repo. from the source. I juss lunch the app, ev'rythin's ok- it may work hours out, but may crash after a few mins... it's about 2-4 hubs open, about 29GB shared files - nothing at all...

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

You did not specify what OS and linuxdcpp version as razzloss asked. Also, we can't reproduce with those steps you provided. Please make sure you are using 1.0.3 as it fixes a number of crashes. If it still crashes, please compile it in debug mode and provide us with a backtrace so we can research the issue (see debug section at http://openfacts.berlios.de/index-en.phtml?title=Ldcpp_Manual).

Revision history for this message
Vovka (my-favourwork) wrote :

LInuxMint 6
linuxdcpp 1.0.3

[New Thread 0xb2494b90 (LWP 28824)]
terminate called after throwing an instance of 'Exception'

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xaea8db90 (LWP 28823)]
0xb7f05430 in __kernel_vsyscall ()
(gdb) backtrace full
#0 0xb7f05430 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb752d8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb752f268 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0xb772b778 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6
No symbol table info available.
#4 0xb7729655 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#5 0xb7729692 in std::terminate () from /usr/lib/libstdc++.so.6
No symbol table info available.
#6 0xb77296b5 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#7 0xb7728fe8 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6
No symbol table info available.
#8 0x0807864c in BufferedSocket::threadRead ()
No locals.
#9 0x080786ad in BufferedSocket::checkSocket ()
No locals.
#10 0x08078faf in BufferedSocket::run ()
No locals.
#11 0x0816b8b7 in Thread::starter ()

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Thanks for the backtrace. We still need debugs enabled to investigate it further. Can you compile 1.0.3 with debugs on and do a "thread apply all backtrace full" when it crashes in gdb?

Revision history for this message
Vovka (my-favourwork) wrote :

....another one crash

UnZFilter end, 10341/4037 = 2.5616
Thrown: Error during decompression
terminate called after throwing an instance of 'Exception'

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb242bb90 (LWP 29185)]
0xb80c2430 in __kernel_vsyscall ()
(gdb) backtrace full
#0 0xb80c2430 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb76ea8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb76ec268 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0xb78e8778 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6
No symbol table info available.
#4 0xb78e6655 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#5 0xb78e6692 in std::terminate () from /usr/lib/libstdc++.so.6
No symbol table info available.
#6 0xb78e66b5 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#7 0xb78e5fe8 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6
No symbol table info available.
#8 0x08078a7b in BufferedSocket::threadRead (this=0x954c560) at client/BufferedSocket.cpp:159
 left = 1400
 used = 1400
 pos = 0
 l = {static npos = 4294967295,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x928f0d4 "$MyINFO $ALL [mark]����� [0] <StrgDC++ V:2.02,M:A,H:5/0/0,S:10>$ $100\t$c"}}

now I'm gonna do the steps you've asked...

Revision history for this message
Vovka (my-favourwork) wrote :

steps:
1 scons debug=true
2 scons install (w\o deleted prev installation, just overwrited existed files)
3 wait for crash >.<

Changed in linuxdcpp:
importance: Undecided → High
status: Incomplete → Confirmed
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

If zlib decompression fails during BufferedSocket::threadRead, an uncaught exception can be thrown. An uncaught exception can also occur in NmdcHub when initializing UNZfilter. Attached patch should fix this. Vovka, can you try it and see if it fixes your issue (patch -p0 < unzfilter.patch)?

DC++ peers, can you review it and see if it looks ok? Patch is for 0.698, so I'll have to update it if it looks good.

Revision history for this message
Vovka (my-favourwork) wrote :

new one crash

file attached

backtrace:
Please specify a command following the thread ID list
(gdb) thread apply all backtrace full

Thread 118 (Thread 0xb2344b90 (LWP 26924)):
#0 0xb8055430 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb767d8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb767f268 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3 0xb787b778 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6
No symbol table info available.
#4 0xb7879655 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#5 0xb7879692 in std::terminate () from /usr/lib/libstdc++.so.6
No symbol table info available.
#6 0xb78796b5 in ?? () from /usr/lib/libstdc++.so.6
No symbol table info available.
#7 0xb7878fe8 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6
No symbol table info available.
#8 0x08078a7b in BufferedSocket::threadRead (this=0xaf28d580) at client/BufferedSocket.cpp:159
 left = 1071
 used = 1071
 pos = 0
 l = {static npos = 4294967295,

Revision history for this message
Vovka (my-favourwork) wrote :

now I'm gonna use patch..
write back soon...

Revision history for this message
Vovka (my-favourwork) wrote :

to prew crash: (after enter pressed)

---Type <return> to continue, or q <return> to quit---
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0xace01844 ""}}
 bufpos = 0
 total = 1400
 __PRETTY_FUNCTION__ = "void BufferedSocket::threadRead()"
#9 0x08078b0e in BufferedSocket::checkSocket (this=0xaf28d580) at client/BufferedSocket.cpp:446
 waitFor = 2
 __PRETTY_FUNCTION__ = "void BufferedSocket::checkSocket()"
#10 0x08079504 in BufferedSocket::run (this=0xaf28d580) at client/BufferedSocket.cpp:460
No locals.
#11 0x0816e083 in Thread::starter (p=0xaf28d5b8) at client/Thread.h:137
 t = (Thread *) 0xaf28d5b8
#12 0xb800850f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#13 0xb7733a0e in clone () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.

Thread 117 (Thread 0xafb42b90 (LWP 26923)):
#0 0xb8055430 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb772bdf1 in select () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0x08142924 in Socket::wait (this=0xaf201930, millis=250, waitFor=2) at client/Socket.cpp:515
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) Quit
(gdb)

Revision history for this message
poy (poy) wrote :

the threadRead one is already caught in BufferedSocket::run, no?
however the init one makes sense...

Revision history for this message
Razzloss (razzloss) wrote :

Well, you can't throw Exception from threadRead because of the throw(SocketException) in the declaration. Exception must be caught in threadRead or the exception specifier removed.

--RZ

Revision history for this message
poy (poy) wrote :

we must be looking at different sources; this was fixed in DC++ in rev 1627.

Revision history for this message
Razzloss (razzloss) wrote :

Yeah, we are. I only checked the latest linuxdcpp trunk (0.7091).

--RZ

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

I forgot to check the latest dcpp trunk as well. However, are you sure that the best way to fix is to change the Exception specification from SocketException to Exception? Wouldn't it be better to handle it locally if possible and continue as my fix attempts? The code already handles an invalid return value from UNZFilter so I'd assume it should be able to handle catching the exception similarly.

Revision history for this message
Vovka (my-favourwork) wrote :

...I've used the patch and now wait for crash. there was some bugs like - the text at some hub was incorectly shown. like bug with utf8. don't know what it may be.

Revision history for this message
Vovka (my-favourwork) wrote :

 pics with bugs...

Revision history for this message
Vovka (my-favourwork) wrote :

14:07-15.03 - ...after patch been used, still working.... ) wait for crash %)

Changed in dcplusplus:
assignee: nobody → steven-sheehy
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
poy (poy) wrote :

Fixed in version 0.760.

Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers