pppd, pthread and hppa-linux question?
Hi all,
Since a month, I use ppp to have an external ISP connection (to have additional rsync and cvs).
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...
Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable
...
(there are so many that it become annoying :()
Well, analysing sources, it seems to come from thread?
Is there some known pb regarding hppa-linux thread implementation (kernel, glibc, pppd, ...)?
Thanks in advance for help,
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
Quoted 5 lines
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailable
this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
randolph
Signature · 3 lines
Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/
Quoted 10 lines
Quoted 6 lines
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailablethis probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
Hmm just: a quick look in src and effectively in mainly pppd/sys-linux.c test errno != EWOULDBLOCK (for sys-sunos4.c we met more (errno != EAGAIN && errno != EWOULDBLOCK)
I am curious if some change occurs about this in cvs?
Thanks,
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily
unavailable
Quoted 5 lines
Quoted 4 lines
this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
... sys-sunos4.c we meet more (errno != EAGAIN && errno != EWOULDBLOCK)
In cvs, the same for sys-aix4.c and sys-osf.c; could I safely try the same here?
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
Quoted 8 lines · Randolph Chung
Quoted 5 lines
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarily unavailablethis probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
It's already in my TODO :)
-- snip --
- EWOULDBLOCK emulation
= Is EWOULDBLOCK emulation required?
= What happens if we alias EWOULDBLOCK as EAGAIN = from the kernel hearders?
- Break HPUX compat?
-- snip --
As JDA notes we still have broken atomic functions in atomicity. Which we are planning to fix with a light weight syscall.
c.
Carlos,
Quoted 22 lines · Randolph Chung
Quoted 5 lines
Quoted 5 lines
All seems to work fine, never the less I notice some pppd messages which I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarilyunavailable
Quoted 3 lines
this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list! :-)
It's already in my TODO :)
-- snip --
- EWOULDBLOCK emulation
= Is EWOULDBLOCK emulation required?
= What happens if we alias EWOULDBLOCK as EAGAIN = from the kernel hearders?
- Break HPUX compat?
-- snip --
Quoted 3 lines
As JDA notes we still have broken atomic functions in atomicity. Which we are planning to fix with a light weight syscall.
Thanks for advises,
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
Hi all,
Quoted 4 lines
Quoted 4 lines · Randolph Chung
Quoted 1 line
Quoted 1 line
All seems to work fine, never the less I notice some pppd messages
which
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
I do not noticed on my i386 Debian GNU/Linux box:
...Feb 10 17:34:57 fw01 pppd[1543]: read: Resource temporarily unavailable Feb 10 17:34:57 fw01 pppd[1543]: read /dev/ppp: Resource temporarilyunavailable
Quoted 3 lines
this probably comes from apps that assume EAGAIN==EWOULDBLOCK. we need to probably fix this in glibc.... let's add it to Carlos' todo list!
:-)
Quoted 11 lines
Quoted 11 lines
It's already in my TODO :)
-- snip --
- EWOULDBLOCK emulation
= Is EWOULDBLOCK emulation required?
= What happens if we alias EWOULDBLOCK as EAGAIN = from the kernel hearders?
- Break HPUX compat?
-- snip --
Quoted 3 lines
Quoted 3 lines
As JDA notes we still have broken atomic functions in atomicity. Which we are planning to fix with a light weight syscall.
Awaiting this Carlos work, I suggest following workaround:
pppd/sys-linux.c +6 -4
@@ -929,7 +933,7 @@ fd = ppp_dev_fd; }if (write (fd, p, len) <0 ) { -if (errno ==EWOULDBLOCK || errno ==ENOBUFS +if (errno ==EWOULDBLOCK || errno ==EAGAIN || errno ==ENOBUFS || errno ==ENXIO || errno ==EIO || errno ==EINTR )warn ("write: warning: %m (%d)" , errno);else
@@ -993,7 +997,8 @@ nr =-1 ;if (ppp_fd >=0 ) { nr =read (ppp_fd, buf, len); -if (nr <0 && errno !=EWOULDBLOCK && errno !=EIO && errno !=EINTR ) +if (nr <0 && errno !=EWOULDBLOCK && errno !=EAGAIN \ + && errno !=EIO && errno !=EINTR )error ("read: %m" );if (nr <0 && errno ==ENXIO )return 0 ;
@@ -1001,7 +1006,8 @@if (nr <0 && new_style_driver && ifunit >=0 ) {/* N.B. we read ppp_fd first since LCP packets come in there. */ nr =read (ppp_dev_fd, buf, len); -if (nr <0 && errno !=EWOULDBLOCK && errno !=EIO && errno !=EINTR ) +if (nr <0 && errno !=EWOULDBLOCK && errno !=EAGAIN \ + && errno !=EIO && errno !=EINTR )error ("read /dev/ppp: %m" );if (nr <0 && errno ==ENXIO )return 0 ;
@@ -1035,7 +1041,7 @@if (n ==0 )fatal ("eof on loopback" ); -if (errno !=EWOULDBLOCK ) +if (errno !=EWOULDBLOCK && errno !=EAGAIN )fatal ("read from loopback: %m(%d)" , errno);return rv;
It seems to me to avoid to much annoying messages.
Do you think I woul have to open a pr near debian maintainer pkg?
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be
Quoted 3 lines
Well, analysing sources, it seems to come from thread?
Is there some known pb regarding hppa-linux thread implementation (kernel, glibc, pppd, ...)?
Yes. There have been issues with locking in glibc wrt threads. Also, the functions in atomicity.h are not atomic. There may also be problems in the kernel, particularly SMP.
Dave
Signature · 2 lines
J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
Quoted 9 lines
Quoted 4 lines
Well, analysing sources, it seems to come from thread?
Is there some known pb regarding hppa-linux thread implementation (kernel, glibc, pppd, ...)?Yes. There have been issues with locking in glibc wrt threads. Also, the functions in
atomicity.hare not atomic. There may also be problems in the kernel, particularly SMP.
Ha ok, I will so wait.
Thanks to all,
Joel
---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be