* [QUESTION] How to reset TCP connections when resuming system from disk/ram
@ 2008-06-01 21:26 Maxim Levitsky
2008-06-04 14:59 ` Pavel Machek
2008-06-04 15:41 ` Maxim Levitsky
0 siblings, 2 replies; 6+ messages in thread
From: Maxim Levitsky @ 2008-06-01 21:26 UTC (permalink / raw)
To: pm list
Hi,
Thanks to your effort, the suspend to ram/disk works flawlessly on my
desktop system.
But I still have rather small, but annoying problem, that system doesn't
understands that a long suspend cycle was done, and still waits for long closed
TCP connections.
I remember there was a patch to close all TCP connections on suspend, but it was rejected
due to the fact that TCP sessions can live through short suspend/resume cycles.
What can you suggest here?
Is there a tool to close all TCP connections?
I noticed that sockets aren't dependent on network drivers,
so even removing network driver doesn't close them.
( I guess that it is possible for TCP session to migrate from one to another
network hardware too)
Another thing I want to know, is this possible to set socket timeout
and how?
(There is a settings page for that in KDE, but I don't yet know what this changes,
a KDE specific settings or not)
I want something CLI based.
Btw, I recently bought an acer laptop (5720G), and there are few suspend/resume issues,
namely:
*attempt to do a second suspend to ram freezes the system hard on resume.
for example this works:
suspend to ram
suspend to disk
suspend to ram
suspend to disk
but this doesn't
suspend to ram
suspend to ram
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] How to reset TCP connections when resuming system from disk/ram
2008-06-01 21:26 [QUESTION] How to reset TCP connections when resuming system from disk/ram Maxim Levitsky
@ 2008-06-04 14:59 ` Pavel Machek
2008-06-05 21:44 ` Maxim Levitsky
2008-06-04 15:41 ` Maxim Levitsky
1 sibling, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2008-06-04 14:59 UTC (permalink / raw)
To: Maxim Levitsky; +Cc: pm list
Hi!
> Thanks to your effort, the suspend to ram/disk works flawlessly on my
> desktop system.
>
> But I still have rather small, but annoying problem, that system doesn't
> understands that a long suspend cycle was done, and still waits for long closed
> TCP connections.
>
> I remember there was a patch to close all TCP connections on suspend, but it was rejected
> due to the fact that TCP sessions can live through short suspend/resume cycles.
Well... tcp sessions can survive even long suspends ... if there's no
NAT nearby and both sides are quiescent...
Dig out the patch and lets see if it can be made acceptable?
> Btw, I recently bought an acer laptop (5720G), and there are few suspend/resume issues,
> namely:
>
> *attempt to do a second suspend to ram freezes the system hard on resume.
> for example this works:
>
> suspend to ram
> suspend to disk
> suspend to ram
> suspend to disk
>
> but this doesn't
>
> suspend to ram
> suspend to ram
Try it from minimum system, but this looks like acpi problem...
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] How to reset TCP connections when resuming system from disk/ram
2008-06-01 21:26 [QUESTION] How to reset TCP connections when resuming system from disk/ram Maxim Levitsky
2008-06-04 14:59 ` Pavel Machek
@ 2008-06-04 15:41 ` Maxim Levitsky
2008-06-04 18:54 ` Alan Stern
1 sibling, 1 reply; 6+ messages in thread
From: Maxim Levitsky @ 2008-06-04 15:41 UTC (permalink / raw)
To: pm list
Maxim Levitsky wrote:
> Hi,
>
> Thanks to your effort, the suspend to ram/disk works flawlessly on my
> desktop system.
>
> But I still have rather small, but annoying problem, that system doesn't
> understands that a long suspend cycle was done, and still waits for long closed
> TCP connections.
>
> I remember there was a patch to close all TCP connections on suspend, but it was rejected
> due to the fact that TCP sessions can live through short suspend/resume cycles.
>
> What can you suggest here?
> Is there a tool to close all TCP connections?
>
> I noticed that sockets aren't dependent on network drivers,
> so even removing network driver doesn't close them.
> ( I guess that it is possible for TCP session to migrate from one to another
> network hardware too)
>
>
> Another thing I want to know, is this possible to set socket timeout
> and how?
>
> (There is a settings page for that in KDE, but I don't yet know what this changes,
> a KDE specific settings or not)
>
> I want something CLI based.
>
>
> Btw, I recently bought an acer laptop (5720G), and there are few suspend/resume issues,
> namely:
>
> *attempt to do a second suspend to ram freezes the system hard on resume.
> for example this works:
>
> suspend to ram
> suspend to disk
> suspend to ram
> suspend to disk
>
> but this doesn't
>
> suspend to ram
> suspend to ram
>
> Best regards,
> Maxim Levitsky
Meanwhile I found a tcpkill utility,
but doesn't do what I want, since this tool gets a list of TCP
connections by sniffing network traffic, thus it can't detect
all connections during suspend.
Any ideas?
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] How to reset TCP connections when resuming system from disk/ram
2008-06-04 15:41 ` Maxim Levitsky
@ 2008-06-04 18:54 ` Alan Stern
2008-06-04 20:38 ` Maxim Levitsky
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2008-06-04 18:54 UTC (permalink / raw)
To: Maxim Levitsky; +Cc: pm list
On Wed, 4 Jun 2008, Maxim Levitsky wrote:
> Maxim Levitsky wrote:
> > Hi,
> >
> > Thanks to your effort, the suspend to ram/disk works flawlessly on my
> > desktop system.
> >
> > But I still have rather small, but annoying problem, that system doesn't
> > understands that a long suspend cycle was done, and still waits for long closed
> > TCP connections.
> >
> > I remember there was a patch to close all TCP connections on suspend, but it was rejected
> > due to the fact that TCP sessions can live through short suspend/resume cycles.
> >
> > What can you suggest here?
> > Is there a tool to close all TCP connections?
I don't know the answer to your question.
However you should note that closing all TCP connections is overkill.
It's quite possible that some processes on your computer are
communicating among themselves using TCP; there's no reason those
connections should be killed.
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] How to reset TCP connections when resuming system from disk/ram
2008-06-04 18:54 ` Alan Stern
@ 2008-06-04 20:38 ` Maxim Levitsky
0 siblings, 0 replies; 6+ messages in thread
From: Maxim Levitsky @ 2008-06-04 20:38 UTC (permalink / raw)
To: Alan Stern; +Cc: pm list
Alan Stern wrote:
> On Wed, 4 Jun 2008, Maxim Levitsky wrote:
>
>> Maxim Levitsky wrote:
>>> Hi,
>>>
>>> Thanks to your effort, the suspend to ram/disk works flawlessly on my
>>> desktop system.
>>>
>>> But I still have rather small, but annoying problem, that system doesn't
>>> understands that a long suspend cycle was done, and still waits for long closed
>>> TCP connections.
>>>
>>> I remember there was a patch to close all TCP connections on suspend, but it was rejected
>>> due to the fact that TCP sessions can live through short suspend/resume cycles.
>>>
>>> What can you suggest here?
>>> Is there a tool to close all TCP connections?
>
> I don't know the answer to your question.
>
> However you should note that closing all TCP connections is overkill.
> It's quite possible that some processes on your computer are
> communicating among themselves using TCP; there's no reason those
> connections should be killed.
Thanks a lot for the pointer, I agree completely
I guess such connections can be filtered by filtering out
connections with all local addresses (localhost, and each nic address)
When I have time I will probably write such a tool
(I need to look at /proc/net/.. for list of open TCP sockets,
and then I need to send RST to both ends of those sockets).
I can even parse netstat output for list of open sockets.
>
> Alan Stern
>
Thanks a lot,
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] How to reset TCP connections when resuming system from disk/ram
2008-06-04 14:59 ` Pavel Machek
@ 2008-06-05 21:44 ` Maxim Levitsky
0 siblings, 0 replies; 6+ messages in thread
From: Maxim Levitsky @ 2008-06-05 21:44 UTC (permalink / raw)
To: Pavel Machek; +Cc: pm list
On Wednesday, 4 June 2008 17:59:00 Pavel Machek wrote:
> Hi!
>
> > Thanks to your effort, the suspend to ram/disk works flawlessly on my
> > desktop system.
> >
> > But I still have rather small, but annoying problem, that system doesn't
> > understands that a long suspend cycle was done, and still waits for long closed
> > TCP connections.
> >
> > I remember there was a patch to close all TCP connections on suspend, but it was rejected
> > due to the fact that TCP sessions can live through short suspend/resume cycles.
>
> Well... tcp sessions can survive even long suspends ... if there's no
> NAT nearby and both sides are quiescent...
Well, nat is close, (in my router....)
>
> Dig out the patch and lets see if it can be made acceptable?
I will try, but currently I have very little free time, thus
I even haven't researched the suspen/resume problems on this notebook
>
> > Btw, I recently bought an acer laptop (5720G), and there are few suspend/resume issues,
> > namely:
> >
> > *attempt to do a second suspend to ram freezes the system hard on resume.
> > for example this works:
> >
> > suspend to ram
> > suspend to disk
> > suspend to ram
> > suspend to disk
> >
> > but this doesn't
> >
> > suspend to ram
> > suspend to ram
>
> Try it from minimum system, but this looks like acpi problem...
Probably, I will investigate thoughtfully this laptop, when I have free time,
It has several broken features including wireless (which works only with disable_hw_scan=1, and still buggy), leds, sound, some messages about
APIC 40 error, webcam that freezes afrer a minute or so, or in other words lots of fun....
It has also an XD and memstick reader that aren't supported - I will try to reverse engineer
the windows driver, to add those drivers to linux (shouldn't be that hard).
I don't want to bother anybody with this stuff yet, since I have very little free time now.
Best regards,
Maxim Levitsky
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-05 21:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-01 21:26 [QUESTION] How to reset TCP connections when resuming system from disk/ram Maxim Levitsky
2008-06-04 14:59 ` Pavel Machek
2008-06-05 21:44 ` Maxim Levitsky
2008-06-04 15:41 ` Maxim Levitsky
2008-06-04 18:54 ` Alan Stern
2008-06-04 20:38 ` Maxim Levitsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox