From: Caleb C. <ca...@ge...> - 2002-02-21 21:37:03
|
Hey, Thanks for the info Michael. Yeah I got the problem fixed, finally . . . I found something else I was wondering about though. When you run the test scripts to they sometimes cause a segment fault? The ones I've noticed doing this are the cg_noAuth_cr and the cg_auth_cr. When I run them under gdb they appear the exit normally, but there is this little quirk: unknown type '' that appears just before the program exits. Thanks Caleb |
From: Michael B. <ba...@us...> - 2002-02-21 21:49:06
|
>>>>> "Caleb" == Caleb Case <ca...@ge...> writes: Caleb> Hey, Thanks for the info Michael. Yeah I got the problem Caleb> fixed, finally . . . I found something else I was Caleb> wondering about though. When you run the test scripts to Caleb> they sometimes cause a segment fault? The ones I've Caleb> noticed doing this are the cg_noAuth_cr and the cg_auth_cr. Caleb> When I run them under gdb they appear the exit normally, Caleb> but there is this little quirk: unknown type '' that Caleb> appears just before the program exits. Caleb> Thanks Caleb Hi Caleb, Unfortunately, this is a known bug. I won't know for sure until it's fixed, but I believe that this caused by multi-threading and our lack of a nice shutdown process. For the most part, we just exit and let the threads get killed. We should give the threads some warning and shut down more gracefully. Since it doesn't affect the code successfully running, it has been getting a lower priority. But it is on a list of things to fix. Mike -- ba...@us... OpenSNMP |
From: Caleb C. <ca...@ge...> - 2002-04-03 01:51:39
Attachments:
cgtest.C
|
Hey there, I've been try to run the test file for CG.C, CG.H (attached cgtest.C). When the send_and_wait test attempts to run it segments faults on: 19: pdu.Add(new VarBind(new OID("system.sysUpTime.0"))); Do you have problems with this? Thanks, Caleb |
From: Michael B. <ba...@us...> - 2002-04-04 00:37:52
|
>>>>> "Caleb" == Caleb Case <ca...@ge...> writes: Caleb> Hey there, I've been try to run the test file for CG.C, Caleb> CG.H (attached cgtest.C). When the send_and_wait test Caleb> attempts to run it segments faults on: Caleb> 19: pdu.Add(new VarBind(new OID("system.sysUpTime.0"))); Caleb> Do you have problems with this? Hi Caleb, Assuming your using the cvs version: That line was actually working OK for me, but I did get segfaults for a couple other reasons. The main problem I found is that the PDU needs to be dynamically created because the pointer sent to send_and_wait or walk can be deleted depending on message problems (e.g. engine ID/ time discovery within the engine). You'll get a PDU back, but not necessarily that PDU. This usage was giving me segfaults: PDU pdu(...); PDU *result = &pdu; result = send_and_wait(result); It should be something like: PDU result = new PDU(...); result = send_and_wait(result); ... delete result; The usage probably came from CG.C because that file had the same problem. You can do a cvs update to get the fix. After fixing CG.C and changing cgtest, it worked for me. Mike -- ba...@us... OpenSNMP |