awesome

Welcome to awesome bug tracking system.
Tasklist

FS#73 - awesome crashes with multiple monitors, regression?

Attached to Project: awesome
Opened by Henrik Olsson (henrik) - Wednesday, 20 February 2008, 11:03 GMT
Last edited by Julien Danjou (jd) - Tuesday, 26 February 2008, 17:26 GMT
Task Type Bug Report
Category Core
Status Closed
Assigned To Julien Danjou (jd)
Operating System Linux
Severity High
Priority Normal
Reported Version 2.2-rc1
Due in Version 2.2
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Upgrading from ubuntu hardy's awesome (2.0.final-1) to 2.2-rc1, i now get crashes that seem to be related to running multiple monitors.

If i start a program on monitor #2, it starts on the correct monitor but the statusbar on monitor #1 shows the program. If i then start a program on monitor #1, awesome crashes.

I did have an xsession-errors file with a X-error, something about bad request, but i seem to have lost it..
This task depends upon

Closed by  Julien Danjou (jd)
Tuesday, 26 February 2008, 17:26 GMT
Reason for closing:  Fixed
Comment by Henrik Olsson (henrik) - Wednesday, 20 February 2008, 11:09 GMT
xsession error:
awesome: fatal error: request code=12, error code=8
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 12 (X_ConfigureWindow)
Serial number of failed request: 146511
Current serial number in output stream: 146530
Comment by John Cooper (choffee) - Thursday, 21 February 2008, 10:20 GMT
I get the same here. I have just compiled this for Ubuntu Gutsy and now it crashes with the following error:

awesome: fatal error: request code=84, error code=12
X Error of failed request: BadColor (invalid Colormap parameter)
Major opcode of failed request: 84 (X_AllocColor)
Resource id in failed request: 0x0
Serial number of failed request: 83
Current serial number in output stream: 83

This only occurs when I try to run it across two screens. This worked with the previous version (2.1).
I use the command "xrandr --output VGA --above LVDS --auto" to switch to two screens and then awesome crashes. Then if I try to start it again I get the error above. Using the command "xrandr --output VGA --off" switches back to a single screen and awesome runs fine again.
Comment by Julien Danjou (jd) - Monday, 25 February 2008, 09:39 GMT
Ok this seems to be a Zaphod issue, I'll try to check.
Comment by John Cooper (choffee) - Monday, 25 February 2008, 09:39 GMT
Hi,

I read in another bug that running "valgrind --tool=callgrind awesome" would give some more info about what is going on.

The bad_start output above is where awesome just crashes when I try and start it up with two monitors.

32427 is the running awesome when I start the change to two monitors.

32433 is, I assume, the process that starts after it has sensed the change in resolution.

Thanks

john
Comment by Julien Danjou (jd) - Monday, 25 February 2008, 12:41 GMT
Can you try latest git, seems to be ok.
Comment by Henrik Olsson (henrik) - Monday, 25 February 2008, 14:11 GMT
Works for me with current git, thanks :)
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 06:13 GMT
Hi, I am still getting this error even with the latest git.
If I delete my config then it works okay. Using my config or the distributed one both give this error.

If I take the config that is created by awesome at runtime then add as line to my task bar as below:

textbox tb_date { text = " Then " }

All works fine but add a line as below:

textbox tb_date { fg = "#111111" text = " Then " }

And it crashes with the dual monitor error as reported above.
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 06:13 GMT
Can you attach the full configuration file crashing awesome please ?
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 06:16 GMT
John: congrats, this bug was quite are to find.

I've fixed it in b7d79d8beada63d4abd65a572b0bf051ba1e702c. Can you give it a try?
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 09:51 GMT
Yes that fixes the crash on startup so I can now run it on two screens. Thanks.

It still crashes when I switch between two and one monitors but I can now restart a new process and that works fine which is great progress.

XIO: fatal IO error 9 (Bad file descriptor) on X server ":0.0"
after 2163 requests (2162 known processed) with 6 events
remaining.

I have attached an strace output, I don't know if that helps.
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 13:55 GMT
WTF ?
execve("/usr/local/sbin/aweso", ["aweso"], [/* 31 vars */]) = -1 ENOENT (No such file or directory)

It looks for aweso. What's in your .xsession / .xinitrc file ?

This is not a awesome related bug at first sight.
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 14:22 GMT
That's what I thought!

But I logged in using the "Safe Terminal" option so I just had an xterm then just ran

strace -o awesome.strace awesome

Unless it is something to do with strace?
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 14:38 GMT
I only read the end. In fact it execute /usr/bin/awesome which seems to be awesome.

Since I can see: open("/home/john/.awesomerc", O_RDONLY) = 4

But somehow later, it tries to execute aweso. So there's maybe a problem in one of your script or your configuration file at first glance. Do you try to restart it or something like that?
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 14:54 GMT
Back to basics now. I have just tried the following:

Login to X using "Safe Terminal" session
Remove .awesomerc
run "strace -o awesome.out awesome &"
- awesome starts and runs with the default setup
Run "xrandr --output VGA --above LVDS --auto"
Watch it crash with the XIO error and create the same type of trace file as above.

I also tested without the strace. Tried recompiling not using debian packages and running from the src dir but all had the same result XIO error and a crash.

I assume that the execve aweso but is caused by it trying to restart when it gets an xrandr change message but I am no programmer!

Thanks
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 15:02 GMT
You guess well. But I don't know why it fails to restart on your config.

Can you try the attached patch?
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 16:36 GMT
The patch did not fix it but having been pointed in the right direction I applied the infinate number of monkeys theorem and came with this...

In that patch if you change the line so it is cmdlen * 2 then it works fine.

a_strcpy(globalconf.argv, cmdlen * 2 , argv[0]);

I don't know what that means it may just be lucky but it does fix my problem, could this be unicode/utf-8 issue?
Comment by Julien Danjou (jd) - Tuesday, 26 February 2008, 16:53 GMT
Ok, you're a very useful monkey, you just pointed out a bug in the argv copy.
Thanks to your monkeys, I've pushed a fix for that, it should be better.
Comment by John Cooper (choffee) - Tuesday, 26 February 2008, 17:11 GMT
I have just tried compiling with the latest from git and it all works fine now.

Thanks a lot for the quick fixes Julien.

Loading...