Bug 16841

Summary: Patches to allow NULL timeout for pending call
Product: dbus Reporter: Colin Walters <walters>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: lemma, scott, walters, zeuthen
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH 1/9] Make sure a pending call timeout isn't assumed.
[PATCH 2/9] Allow a pending call to block forever
[PATCH 3/9] Don't allocate DBusTimeout for pending call when passed INT_MAX
[PATCH 4/9] Update documentation now that INT_MAX means no timeout.
[PATCH 5/9] Fix issue where timeouts can overflow.
[PATCH 6/9] Remove 6 hour timeout restriction.
[PATCH 7/9] Explicitly check for zero time fields.
[PATCH 8/9] Expire list timeout may be negative for no expiry.
[PATCH 9/9] Change default reply timeout.
[PATCH 01/11] Make sure a pending call timeout isn't assumed.
[PATCH 02/11] Allow a pending call to block forever
[PATCH 03/11] Don't allocate DBusTimeout for pending call when passed INT_MAX
[PATCH 04/11] Update documentation now that INT_MAX means no timeout.
[PATCH 05/11] Fix issue where timeouts can overflow.
[PATCH 06/11] Remove 6 hour timeout restriction.
[PATCH 07/11] Explicitly check for zero time fields.
[PATCH 08/11] Expire list timeout may be negative for no expiry.
[PATCH 09/11] Change default reply timeout.
[PATCH 10/11] Unrestrict session bus timeout.
[PATCH 11/11] Add tests for pending call timeouts

Description Colin Walters 2008-07-24 14:20:05 UTC
Created attachment 17862 [details] [review]
[PATCH 1/9] Make sure a pending call timeout isn't assumed.

From: Scott James Remnant <scott@netsplit.com>
Comment 1 Colin Walters 2008-07-24 14:20:30 UTC
Created attachment 17863 [details] [review]
[PATCH 2/9] Allow a pending call to block forever
Comment 2 Colin Walters 2008-07-24 14:58:20 UTC
Some discussion context for these patches:
http://lists.freedesktop.org/archives/dbus/2008-July/010125.html
Comment 3 Colin Walters 2008-07-24 15:06:57 UTC
Created attachment 17864 [details] [review]
[PATCH 3/9] Don't allocate DBusTimeout for pending call when passed INT_MAX
Comment 4 Colin Walters 2008-07-24 15:07:18 UTC
Created attachment 17865 [details] [review]
[PATCH 4/9] Update documentation now that INT_MAX means no timeout.
Comment 5 Colin Walters 2008-07-24 15:07:39 UTC
Created attachment 17866 [details] [review]
[PATCH 5/9] Fix issue where timeouts can overflow.
Comment 6 Colin Walters 2008-07-24 15:07:55 UTC
Created attachment 17867 [details] [review]
[PATCH 6/9] Remove 6 hour timeout restriction.
Comment 7 Colin Walters 2008-07-24 15:08:15 UTC
Created attachment 17868 [details] [review]
[PATCH 7/9] Explicitly check for zero time fields.
Comment 8 Colin Walters 2008-07-24 15:08:33 UTC
Created attachment 17869 [details] [review]
[PATCH 8/9] Expire list timeout may be negative for no expiry.
Comment 9 Colin Walters 2008-07-24 15:08:55 UTC
Created attachment 17870 [details] [review]
[PATCH 9/9] Change default reply timeout.
Comment 10 Colin Walters 2008-07-24 19:12:08 UTC
To state the obvious, a lot of changes here.  Do you have any thoughts on extending the test suite to cover some of this?  I guess a tricky part about that would be simulating timeout values while not actually making the developer runnig "make check" wait hours =)
Comment 11 Colin Walters 2008-09-04 19:31:38 UTC
For archaeology purposes, links to mailing list discussion:

http://lists.freedesktop.org/archives/dbus/2008-July/010125.html

It sounded like Havoc agreed on these.  David, what do you think at a high level?
Comment 12 David Zeuthen (not reading bugmail) 2009-05-11 15:11:21 UTC
(In reply to comment #11)
> For archaeology purposes, links to mailing list discussion:
> 
> http://lists.freedesktop.org/archives/dbus/2008-July/010125.html
> 
> It sounded like Havoc agreed on these.  David, what do you think at a high
> level?
> 

Sorry for the lag - yes, I think using INT_MAX to mean infinite timeout would be sane...

    David
Comment 13 Scott James Remnant 2009-05-11 15:42:50 UTC
Created attachment 25769 [details] [review]
[PATCH 01/11] Make sure a pending call timeout isn't assumed.
Comment 14 Scott James Remnant 2009-05-11 15:43:12 UTC
Created attachment 25770 [details] [review]
[PATCH 02/11] Allow a pending call to block forever
Comment 15 Scott James Remnant 2009-05-11 15:43:35 UTC
Created attachment 25771 [details] [review]
[PATCH 03/11] Don't allocate DBusTimeout for pending call when passed INT_MAX
Comment 16 Scott James Remnant 2009-05-11 15:43:57 UTC
Created attachment 25772 [details] [review]
[PATCH 04/11] Update documentation now that INT_MAX means no timeout.
Comment 17 Scott James Remnant 2009-05-11 15:44:19 UTC
Created attachment 25773 [details] [review]
[PATCH 05/11] Fix issue where timeouts can overflow.
Comment 18 Scott James Remnant 2009-05-11 15:44:38 UTC
Created attachment 25774 [details] [review]
[PATCH 06/11] Remove 6 hour timeout restriction.
Comment 19 Scott James Remnant 2009-05-11 15:45:01 UTC
Created attachment 25775 [details] [review]
[PATCH 07/11] Explicitly check for zero time fields.
Comment 20 Scott James Remnant 2009-05-11 15:45:23 UTC
Created attachment 25776 [details] [review]
[PATCH 08/11] Expire list timeout may be negative for no expiry.
Comment 21 Scott James Remnant 2009-05-11 15:46:33 UTC
Created attachment 25777 [details] [review]
[PATCH 09/11] Change default reply timeout.
Comment 22 Scott James Remnant 2009-05-11 15:46:59 UTC
Created attachment 25778 [details] [review]
[PATCH 10/11] Unrestrict session bus timeout.
Comment 23 Scott James Remnant 2009-05-11 15:47:22 UTC
Created attachment 25779 [details] [review]
[PATCH 11/11] Add tests for pending call timeouts
Comment 24 Scott James Remnant 2009-05-11 15:49:32 UTC
Refreshed the patch set.

The only change was to the first patch, which had a pretty obvious think-o.

I also added a 10th patch to unrestrict the reply timeout on the session bus (the conf was intended to raise it, but with these patches it lowers it)

and at Colin's suggestion, I've added some pending call tests that at least follow the code path.
Comment 25 Havoc Pennington 2009-05-27 20:01:16 UTC
This all looks sane to me, I think it's fine to commit.
Comment 26 Scott James Remnant 2009-05-28 02:49:31 UTC
Pushed to GIT.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.