Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: call to Net::SSH2 functions crashes caller object

by salva (Abbot)
on Sep 20, 2013 at 09:32 UTC ( #1054985=note: print w/replies, xml ) Need Help??

in reply to call to Net::SSH2 functions crashes caller object

If you get a SEGV error that means that there is some bug on Net::SSH2, or in some other XS module or in perl.

Try to write a minimal test script that still triggers the error and then send it as a bug report to Net::SSH2 maintainer. He is quite fast fixing bugs on Net::SSH2!

Otherwise, as it seems you are running your script in some kind of Unix/Linux system, you may like to switch to Net::OpenSSH.

  • Comment on Re: call to Net::SSH2 functions crashes caller object

Replies are listed 'Best First'.
Re^2: call to Net::SSH2 functions crashes caller object
by jasathra (Initiate) on Sep 23, 2013 at 07:09 UTC

    Hi, Thanks for reply, my 1st question, is there really a need to make that lexical variable %Event (defined in global ?

      Trying to fix something you don't understand by randomly changing related things is not going to be very productive.

      Try to find where and why the variable gets corrupted and then write a proper patch, or just do as I toll you on my previous post and send a bug report to the author.

      Anyway, I find hard to imagine a bug causing a SEGV error that could be fixed by just changing a package variable from lexical to global.

      Is your program using threads?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054985]
[marinersk]: sub newtest{my $expected_result = &target('foo'); my $actual_result = &target('foo'); if ($actual_result eq $expected_result) { &tdd_success(); } else { &tdd_fail(); } } # Test works after three years!
[choroba]: or nobody bothered...
[choroba]: The problem was bigger, as the test tried to call a method that didn't exist anymore
[marinersk]: :: ducking ::
[choroba]: because, someone renamed the method, but didn't notice it was used in the test, as the test was skipped
[marinersk]: Well, if the method doesn't exist, it would be hard to pass the test.
[choroba]: later, someone removed the new method, as all its usage places were safe, but didn't notice the test still used the old name
[choroba]: fortunately, it wasn't that hard to replace the method and fix a few remaining failures due to the changes we did to the codebase over the years
[marinersk]: choroba Sounds like a process improvement opportunity; tests may not all need to be run, but they should all be compiled with perl -c before check-in/promotion happens.
[choroba]: so, now I have the test, so I can start making changes in the code. Back to the original ticket, yay!

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2017-05-25 15:10 GMT
Find Nodes?
    Voting Booth?