Ticket #757 (reopened bug)

Opened 2 years ago

Last modified 1 month ago

[app_server] deadlock on workspace switching

Reported by: diver Assigned to: axeld
Priority: blocker Milestone: R1/alpha1
Component: Servers/app_server Version:
Cc: Platform: All

Description (Last modified by axeld)

This is hard to reproduce i fear, but i'll try to explain.
This is kinda stress test and takes about 3-5 min.
After Haiku bootup type in terminal - screensaver.
You need to switch workspaces (alt+f1,alt+f2) like crazy
and in the same time you need to switch betwen terminal and screensaver
from in the team menu of the deskbar. You couls see various things, like
some menus opening in the upper left corner, white spaces, etc.
After several minutes app_server will just freeze.

Attachments

app_server_crash_9.PNG (23.9 kB) - added by diver on 08/21/06 07:46:43.
back trace for comment #1

Change History

08/21/06 03:45:20 changed by diver

Checked again and this time app_server crashed in WindowLayer::Frontmost() as
in #195.

08/21/06 03:57:17 changed by diver

Ok, it seems i found a way to deadlock it faster,
press Be Menu-Preferences, select all prefs and start them at once.
After they are loaded repeat steps in my first comment after this line:
"After Haiku bootup type in terminal - screensaver."
app_server should lock up after 3-6 seconds.
Hope this would help...

08/21/06 04:15:07 changed by diver

It seems that the more you have opened apps the faster you could dead lock
app_server, i could reproduce this dead lock very easy now, it takes me a
second or two (no more 3-5 min) now to bring down app_server ;-)

08/21/06 07:46:43 changed by diver

  • attachment app_server_crash_9.PNG added.

back trace for comment #1

08/24/06 15:18:51 changed by axeld

  • platform set to All.
  • component changed from General to User Interface/Application Server.
  • description changed.

(follow-up: ↓ 6 ) 08/24/06 15:56:58 changed by axeld

I'm afraid I don't understand your description. What should I do with ScreenSaver and Terminal, and how?

(in reply to: ↑ 5 ) 08/25/06 04:56:48 changed by diver

Replying to axeld:

I'm afraid I don't understand your description. What should I do with ScreenSaver and Terminal, and how?

Ok, this is just a copy & paste bug from another ticket :-)
You don't need to do anything with ScreenSaver and Terminal now, what you need is:
Boot haiku, BeMenu->Preferences->click.
Select all items in this folder and press enter to load them at once.
After they all loaded you need to start clicking fast on team menu of the Deskbar of just select one of them (e.g. the last one, in my case it's FileTypes) and in the same time you need to start switching workspaces via alt+f1/alt+f2 as fast as you click on FileTypes, after 2-3 sec you will deadlock app_server.
Hope this would help...

08/26/06 10:19:46 changed by axeld

That helped, thanks!
Does this still happen after r18646? Even though, I didn't track it back to have anything to do with DesktopSettings (this only happened when I had "Workspaces" open), I can't reproduce it anymore.
(I only see drawing bugs for which I'll open a new bug report)

08/27/06 16:48:42 changed by diver

I managed to reproduce this deadlock only once again, but it might be caused of low memory situation.

08/27/06 17:35:06 changed by axeld

A locking deadlock can't really be caused by low memory (unless low memory causes a different code path that exposes a locking bug), so I leave this bug open for now.
Thanks for the update!

07/23/07 02:13:53 changed by diver

This deadlock still with us at r21691.

10/02/07 05:50:55 changed by axeld

  • milestone changed from R1 to R1/alpha.

10/12/07 05:17:38 changed by stippi

  • status changed from new to closed.
  • resolution set to fixed.

There was indeed a deadlock in the EventFilter for keyboard events, I changed that recently to process the workspace switch event in the Desktop thread, so it should be fixed for good. The event filter tried to lock the desktop to switch workspaces, but the desktop could already be locked itself and trying to grab the event dispatcher lock... deadlock.

10/12/07 15:55:24 changed by diver

  • status changed from closed to reopened.
  • resolution deleted.

I could still deadlock it with r22510 under vmware, reopening.

10/12/07 16:01:39 changed by diver

Oh and strange thing is that Time & Date preflet still running, but i can't move any window and interface is not responding at all, but clock arrows are still moving.

(follow-up: ↓ 16 ) 10/18/07 08:53:24 changed by axeld

Can you still reproduce this with r22614? At least I've fixed a few deadlock situations there.
The Time&Date thing is really strange, though - that sounds like a different kind of deadlock.

(in reply to: ↑ 15 ) 10/18/07 09:01:01 changed by jackburton

Replying to axeld:

Can you still reproduce this with r22614? At least I've fixed a few deadlock situations there.
The Time&Date thing is really strange, though - that sounds like a different kind of deadlock.

I could reproduce that thing too, but by creating a new project with BeIDE. The GUI was all frozen, except the mouse pointer (which, AFAIK, is moved from another thread).

10/25/07 05:58:02 changed by stippi

diver, can you still reproduce the deadlock when switching workspaces? I think I have fixed a deadlock when using the keyboard shortcuts to switch workspaces, while Axel later fixed some more that affected workspace switching with the mouse, if I understand correctly.

10/25/07 12:49:35 changed by stippi

  • status changed from reopened to closed.
  • resolution set to fixed.

While investigating #634, I have switched workspaces like mad all afternoon. I have not once experienced a lockup (running in VMWare). If there is another way to produce this, than by opening all apps at once and quickly switching workspaces at the same time either by keyboard shortcut or via the Workspaces applet (mouse), then please reopen...

10/26/07 07:38:25 changed by diver

  • status changed from closed to reopened.
  • resolution deleted.

I tried the same with r22730 and managed to deadlock it twice.
Strange but cursor in Terminal still blinks and i see ProcessController activity in Deskbar, but in the same time i can't move any window and system is not responding to mouse/keyboard events. I would like to reopen this bug as there are still some problems remain.

10/26/07 08:09:22 changed by stippi

Just to be sure, by "I tried the same" you mean the way to reproduce this I outlined above?

10/26/07 08:25:59 changed by diver

Yes, i mean that i could reproduce it the way i describe it above.

02/07/08 16:48:55 changed by diver

Still here in r23879

04/13/08 10:15:54 changed by emitrax

Is this bug still with us? I gave it a shot to reproduce it quickly but I had not luck.
Do you still reproduce it in the same way?