The pet project continues - nzbget-0.1.2-alt4

Get help, report and discuss bugs.
rvkasper

RE: The pet project continues - nzbget-0.1.2-

Post by rvkasper » 22 Feb 2005, 00:50

Hey there placebo

I tried doing what you said - it always seems to hang at the same point in an nzb download and here is the debug output - maxconnections set to 1 in config:

[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::write(char* line)
[DEBUG] Connection::doWrite(char* text)
[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::doDisconnect()
[DEBUG] Connection::connect()
[INFO] Opening connection to news.usenetserver.com
[DEBUG] Connection::doConnect()
[DEBUG] Connection::DoReadLine()
[INFO] Connection to news.usenetserver.com established.
[DEBUG] Connection::DoReadLine()
Segmentation fault

Hope this helps.

Thanks,
Ryan

rvkasper

RE: The pet project continues - nzbget-0.1.2-

Post by rvkasper » 22 Feb 2005, 03:06

To followup to above output:
Yes this happens with any nzb file I queue up - always seems to occur at the same point in the download.
I have tried it with nzxb files from 1gb to 28 gb :)

Let me know if I can provide any additional info or assistance.

Ryan

nibor2005

RE: The pet project continues - nzbget-0.1.2-

Post by nibor2005 » 22 Feb 2005, 08:14

Maybe you can give the backtrace of the stack.

just start: gdb nzbget

(gdb) run

than when it crashes:
(gdb) bt

(make sure the program compiles with the "-g3 -O0" compiler flag, otherwise no debug information is available)


placebodk

RE: The pet project continues - nzbget-0.1.2-

Post by placebodk » 22 Feb 2005, 09:49

rvkasper, thanx for the info - you are not the only one getting this crash.

Unfortunately the log, although nice to have, does not give an exact hint to where it's crashing.

I think one of the next things to do with this project would be to put in some more indicative debug-statements which could make bugfixes easier.

However until this is put into the code, nibor2005's great suggestion to run it in gdb and do a backtrace could (would) be very helpful as to figuring out where it's crashing.

/placebodk

rvkasper

RE: The pet project continues - nzbget-0.1.2-

Post by rvkasper » 22 Feb 2005, 18:53

Hi there Robin and Placebo,

Thanks for the tip on debugging! I have some output for you now...

Here is the console output it was giving me right beofre the crash:
[INFO] Decoded thp-mcd-dvdr.vol014+11.PAR2.34
6ew Thread -1281516313 (LWP 27592)] 07:48:29 [Thread -1260524624 (zombie) exited] [
New Thread -1260524157 (LWP 27671)] 15:33:59
[Thread -1281516624 (zombie) exited] [Thread -1241515088 217mbie) exited] 1:15:44
[New Thread -1281516624 (LWP 27672)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1292006480 (LWP 27569)]
0x41566c90 in strncmp () from /lib/tls/libc.so.6

Here is the output from typing bt into gdb:

(gdb) bt
#0 0x41566c90 in strncmp () from /lib/tls/libc.so.6
#1 0x08050448 in ArticleDownloader::run (this=0xb600bf80) at ArticleDownloader.cpp:178
#2 0x08053fa2 in Thread::thread_handler (obj=0xb600bf80) at Thread.cpp:72
#3 0x4171798c in start_thread () from /lib/tls/libpthread.so.0
#4 0x415bb7da in clone () from /lib/tls/libc.so.6

Muy interesante - I, however, am not familiar with C. Hope this helps!

Thanks,
Ryan

vinnaaah

RE: The pet project continues - nzbget-0.1.2-

Post by vinnaaah » 23 Feb 2005, 07:32

Ryan,

Very interesting, thanks for testing it. I also had the segmentation fault, but I cannot reproduce it at the moment, the nzb that failed has passed retention..

I'm also not a C programmer, but I glanced at the code that produces the error (a string compare which checks if reauthentication is required).

This piece of code has indeed been changed alt3 -> alt5, and I've done a quick fix in my local copy (check end of article before checking authorization).

I'll be testing this on my next nzb :)

greets,
Vinnaaah

placebodk

RE: The pet project continues - nzbget-0.1.2-

Post by placebodk » 23 Feb 2005, 07:41

rvkasper, thanx for that crucial info.

With the risk of being totally and catastrophically wrong the info you provided actually made sense and I think I have a patch for it (fingers crossed).

New source file with patch applied:
http://files.interiority.dk/nzbget-0.1.2-alt5.1.tar.gz

Or apply the patch to your current source:
Download http://files.interiority.dk/nzbget-0.1.2-alt5.1.patch and copy it into your source dir, then run:
patch -p1 <nzbget-0.1.2-alt5.1.patch

Let me know how it turns out.

/placebodk

vinnaaah

RE: The pet project continues - nzbget-0.1.2-

Post by vinnaaah » 23 Feb 2005, 11:01

alas, with patch still a (different) segmentation error:

[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::DoReadLine()
[DEBUG] Connection::DoReadLine()

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 25003516 (LWP 9870)]
0x401610b3 in __pthread_alt_unlock () from /lib/libpthread.so.0
(gdb) bt
#0 0x401610b3 in __pthread_alt_unlock () from /lib/libpthread.so.0
#1 0x4015dd7a in pthread_mutex_unlock () from /lib/libpthread.so.0
#2 0x0804b241 in SingleServerPool::freeConnection (this=0x8094328, con=0x8094390) at SingleServerPool.cpp:167
#3 0x0804d565 in MultiServerPool::freeConnection (this=0x80840f0, level=0, conn=0x8094390) at MultiServerPool.cpp:60
#4 0x0805029d in ArticleDownloader::run (this=0x82fabf8) at ArticleDownloader.cpp:221
#5 0x08053ab2 in Thread::thread_handler (obj=0x82fabf8) at Thread.cpp:72
#6 0x4015ce51 in pthread_start_thread () from /lib/libpthread.so.0
#7 0x4015cecf in pthread_start_thread_event () from /lib/libpthread.so.0
#8 0x403776ea in clone () from /lib/libc.so.6

wfhiker

RE: The pet project continues - nzbget-0.1.2-alt4

Post by wfhiker » 23 Feb 2005, 11:11

Hi,

if there is a problem in the SingleServerPool you could try to use the patch I wrote to get nzbget 0.1.2 on FreeBSD:
http://www.nefkom.info/hiker/nzbq/nzbge ... .2-fp1.bz2

I think pointers to local mutexes are saved in a vector. This might cause the segfault.

vinnaaah

RE: The pet project continues - nzbget-0.1.2-

Post by vinnaaah » 23 Feb 2005, 11:44

hi hiker,

I've patched the 0.1.2 (orig) files and compiled alt5 with these files.
Now we're testing again :)

grtV

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 63 guests