bugThe GNU Hurd - Bugs: bug #49278, fprintf(stderr, ...) returns -1...

 
 

bug #49278: fprintf(stderr, ...) returns -1 (EINTR)

Submitter:  Brent Baccala <baccala>
Submitted:  Thu 06 Oct 2016 04:44:51 AM UTC
   
 
Category:  Hurd Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Reproducibility:  Every Time
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 


* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Jul 2018 03:48:53 PM UTC, comment #2: 

I've just downloaded the original c file (fprint-test.c), compiled, it, and it did produce the error.  fprintf still can return -1.

Anonymous
Thu 06 Oct 2016 06:58:10 AM UTC, comment #1: 

I suspect this is caused by a no-more-senders notification on the receive right of the filesystem root port, to which the client sent the message.  If you add sleep(2) after the mach_msg call in the client, so that it doesn't deallocate the send right before mach_msg times out in the server, then the EINTR doesn't happen on the first call.  (I didn't test more calls.)  The no-more-senders notification would be requested because trivfs_S_fsys_getroot calls ports_get_right.  The notification is handled in ports_do_mach_notify_no_senders.

If the EINTR only happens on the first call, that seems wrong.

Kalle Olavi Niemitalo <kon>
Thu 06 Oct 2016 04:44:51 AM UTC, original submission:  

Under certain circumstances, fprintf to stderr can return -1 with errno = EINTR.

Test program attached.

Brent Baccala <baccala>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #38667:  fprintf-test.c added by baccala (3KiB - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kon (Posted a comment)
  • -email is unavailable- added by baccala (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-06 baccala Attached File- Added fprintf-test.c, #38667

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code