- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- pty dropping data
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 02:24 AM
тАО05-21-2008 02:24 AM
I am trying to solve a bug on the perl module Net::SFTP::Foreign (http://rt.cpan.org/Ticket/Display.html?id=35888).
To handle password authentication, Expect is used under the hood and the interprocess communication goes through a PTY. The module does IO in a select loop and the NONBLOCK fcntl flag is set on the PTY.
I have found that writing more than 512 bytes of data to the PTY causes HP-UX to discard the excess (I have used truss to see what was going on, and I am sure the data is discarded at the OS level!). Performing too many consecutive small write operations have the same effect.
Is there anyway to stop that from happening?
Solved! Go to Solution.
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 04:20 AM
тАО05-21-2008 04:20 AM
SolutionInteresting. I see that you are actually the maintainer of this module and that the bug was reported to CPAN in the last week.
Moreover, "The same problem occurs on a "put" transfer from an AIX machine.".
For HP-UX it looks like the problem was reported on 11.11 on a PA-RISC platform using a 64-bit Perl 5.8.7.
One avenue to follow might be to make sure that the latest streams patch for 11.11 has been applied:
PHNE_36441
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 05:43 AM
тАО05-21-2008 05:43 AM
Re: pty dropping data
$ uname -a
HP-UX td191 B.11.31 U 9000/800 3397116299 unlimited-user license
How can I check it PHNE_36441 has been applied?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 05:47 AM
тАО05-21-2008 05:47 AM
Re: pty dropping data
> How can I check it PHNE_36441 has been applied?
# swlist PHNE_36441
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 05:53 AM
тАО05-21-2008 05:53 AM
Re: pty dropping data
Oh, I just read your last post more carefully.
Your test machine is NOT the same as the bug-reported machine.
Your test machine is 11.31 whereas the original report was for 11.11. The patch I suggested does NOT apply to 11.31.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 06:17 AM
тАО05-21-2008 06:17 AM
Re: pty dropping data
The tesdrive box I am using with HP-UX 11.31 has PHNE_35897 installed, and the latest STREAMS patch for this version seems to be PHNE_36574, though I don't see any reference to data lost problems in its description.
BTW, I have also posted a similar question on Perlmonks with a sample script showing the problem: http://perlmonks.org/?node_id=687727
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 08:39 AM
тАО05-21-2008 08:39 AM
Re: pty dropping data
I see that you notedd, "After some investigation I have found that the operative system drops data when syswrite is called with more than 512 bytes or when consecutive enough syswrites summing up more than 512 bytes are performed."
Given that, it would helpful (at least in debugging) to report the ERRNO (Perl's $!) returned by 'syswrite'. The meanings are then documented in 'write(2)':
http://docs.hp.com/en/B2355-60127/write.2.html
http://docs.hp.com/en/B2355-60130/write.2.html
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 08:59 AM
тАО05-21-2008 08:59 AM
Re: pty dropping data
I have include the interesting truss (well, tusc) output on the Perlmonks thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 09:19 AM
тАО05-21-2008 09:19 AM
Re: pty dropping data
The bug is so new that you might actually need to wait a few weeks for a fix to come out.
If it was recently introduced, you may be able to download and use a previous version of your CPAN module, but that of course may lead to other problems.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2008 10:20 AM
тАО05-21-2008 10:20 AM
Re: pty dropping data
> AFAIK, errno is only updated when there is a failure
Yes, 'syswrite' returns the number of bytes written or 'undef'. If 'undef' is returned, then ERRNO is available according to the documentation. Thus, I see what you are saying.
> SEP: If it was recently introduced, you may be able to download and use a previous version of your CPAN module, but that of course may lead to other problems.
Well, SEP, it just so happens that Salva *is* the maintainer of this module (as I noted in my opening post)!
Regards!
...JRF...