[Wishlist] time out on bad network connections

Bug #962954 reported by YannUbuntu
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
pastebinit
Fix Released
Wishlist
Stéphane Graber

Bug Description

On some systems (especially those with bad internet connexion), Pastebinit hangs indefinitely and blocks some applications (eg it blocks Boot-Repair).

Possible solutions:

1) Pastebinit should abort and return an error when it could not get any URL after X seconds (eg 20s).

2) OR Pastebinit should propose a "timeout" option (equivalent to the -T option of wget).
Extract of the "wget manpage" that we could adapt to pastebinit:
______________________
 -T seconds
       --timeout=seconds
           Set the network timeout to seconds seconds. (...)

           When interacting with the network, Wget can check for timeout and
           abort the operation if it takes too long. This prevents anomalies
           like hanging reads and infinite connects. The only timeout enabled
           by default is a 900-second read timeout. Setting a timeout to 0
           disables it altogether.
______________________

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Yann, please slow down.

What's the point of a timeout option for pastebinit?

Revision history for this message
YannUbuntu (yannubuntu) wrote :

preventing anomalies like hanging in applications which use pastebinit. (like Boot-Repair or OS-Uninstaller)

Revision history for this message
Rolf Leggewie (r0lf) wrote :

instead of a configurable option, I'd vote for settings things to a sane default (if there currently is none). I don't see the point of making this configurable.

Revision history for this message
YannUbuntu (yannubuntu) wrote :

Here is an example where this can be useful: some wifi connections appear connected in the network-manager, but (maybe due to internet provider problem or network problem) :
(1) either the connection indefinitely hangs (eg. Firefox keeps searching indefinitely, and Pastebinit keeps searching indefinitely, and wget too if no timeout has been set)
(2) or the connection hangs x seconds (i saw cases with 10s< x < 30s) then it connects successfully.

My main concern is to solve the (1) case (prevent Pastebinit to hang up indefinitely). For this, I'm ok with a "sane default" too. For example, a "sane default" could be: Pastebinit returns an error if it could not get any URL after 20s timeout.

However, for case (2), making it configurable would be better. For Pastebinit devs, i guess it is a similar task (just replacing "20" by "$timeout"). This would allow the developers using Pastebinit in their app, to control how long they accept to make the user wait before aborting the pastebin. (it's a compromise between speed/reliability, eg if there is a Pastebin fallback the timeout will be set to 10s, if not it will be set to 50s).

(まだ日本にいますか)

YannUbuntu (yannubuntu)
Changed in boot-repair:
status: New → Triaged
importance: Undecided → Medium
YannUbuntu (yannubuntu)
summary: - [Wishlist] Add a "--timeout=seconds" option
+ Pastebinit blocks some applications
Changed in boot-repair:
importance: Medium → High
description: updated
Changed in pastebinit:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
YannUbuntu (yannubuntu) wrote : Re: Pastebinit blocks some applications

For information, Pastebinit is used by ~1500users/day via Boot-Repair. ( https://sourceforge.net/projects/boot-repair/files/statistics/boot-repair.repair.counter/stats/timeline ).

so:
- many (most?) Pastebinit users use it via Boot-Repair
- this bug might prevent many Linux users from fixing their boot / using their PC ! --> please consider a (much) higher importance...

Rolf Leggewie (r0lf)
summary: - Pastebinit blocks some applications
+ [Wishlist] time out on bad network connections
YannUbuntu (yannubuntu)
Changed in boot-repair:
importance: High → Medium
YannUbuntu (yannubuntu)
no longer affects: boot-repair
Revision history for this message
Stéphane Graber (stgraber) wrote :

Timeout set to 5s.

Changed in pastebinit:
status: Triaged → Fix Committed
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
YannUbuntu (yannubuntu) wrote :

Merci Stéphane.

some questions about this fix: https://answers.launchpad.net/ubuntu/+source/pastebinit/+question/241849

Changed in pastebinit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.