New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Segmentation fault" on login in version 2.0.26 #1465
Comments
The unit tests don't reproduce it. To verify that that method is being called I added an You can see that it's being called if you click on the unit test results for any of the 7.x versions: https://travis-ci.org/github/terrafrost/phpseclib/builds/670069628 (the 5.x versions don't use GNU Parallels in the unit tests; not sure why it's showing up with parallels but not without...) Doesn't really make a ton of sense to me either tbh. In fact, for good measure, I created a second branch to run locally: https://github.com/terrafrost/phpseclib/tree/22h-2 I then ran this script:
Here's the output I got (redacting the nlist output):
So clearly I'm not able to reproduce the issue locally, either, despite calling SFTP::login method that you're suggesting should trigger the error (and despite SFTP::login calling SSH2::login)... |
I mean, I guess you could post your phpinfo but tbh I don't really see how that'd help. But hey - it couldn't hurt, either! On Linux coredump's produce a text file on the file system. Do segfault's? If so maybe you could post that? idk that I've ever tried to dig into a hypothetical segfault file but I could try idk. It would be interesting to know how https://github.com/terrafrost/phpseclib/tree/22h-2 behaves on your system. Based on what you're saying it should loop endlessly, toggling between |
Same Issue here, SegFault on SFTP-Login
...followed by tight endless loop until logfiles reach space-limit...
|
@Hooddominator - as I've already noted I cannot reproduce. It's not reproducable on Travis CI and it's not reproducable locally. Quoting my last post:
As for your "PHP Notice: Undefined offset: 256" errors... see #1271. Quoting the most relevant portion of that post:
If you are unable to run https://github.com/terrafrost/phpseclib/tree/22h-2 as I requested then maybe you can give me SSH access to a server that reproduces the problem. Maybe I'd be able to reproduce the issue by SFTP'ing into a server from my own local machine using phpseclib. Or maybe the problem is with some weird custom PHP install and the only way to reproduce the problem is to both run phpseclib from a server that reproduces the problem and connect to an appropriate SFTP server. |
thanks for the feedback, i will try to reproduce the whole tomorrow in isolation. |
I found the problem, we extended the SFTP class in our application. In this case you got an endless loop on the login method call. Here a example:
I think there are 2 options now:
thx for your time |
Nice job figuring that out! I'm now able to reproduce the problem! I need to get ready for work but I'll take a look this evening / weekend. Thanks!! |
No problem and thanks for your time |
c301ddf should fix this. The 2.0 branch, owing to fact that the minimum version of PHP that it supports is 5.3, implements this more elegantly: The 3.0 branch implements it even more nicely and no changes were necessary for the 3.0 branch. I'll try to do a release of the 2.0 branch this weekend! |
A new 2.0 branch has been released! |
Version: 2.0.26
Message: "Segmentation fault"
Commit with problem: 229f6af
Currently I get a "segmentation fault" back when trying to log in over sftp. This is triggered by an endless loop in https://github.com/phpseclib/phpseclib/blob/2.0.26/phpseclib/Net/SFTP.php#L415
Does anyone else have the problem or can reproduce it?
The text was updated successfully, but these errors were encountered: