
Hello,
I've been using xmonad from darcs. Today I pulled the latest version
and, after compiling xmonad, I found it segfaults during the startup.
I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my
local user.
I do get a warning from xorg before xmonad segfaults, but I don't think
it's relevant:
Xlib: extension "XINERAMA" missing on display ":0.0"
I don't think it's relevant because the same warning shows up even on
working versions of xmonad.
I tested different versions of xmonad from darcs repository and I found
out it breaks on the following patch:
Mon Feb 4 17:23:48 BRST 2008 Brent Yorgey

almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again. runhaskell Setup.lhs clean then rebuild. http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo... Same for any config repo you use.

On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart
almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again.
runhaskell Setup.lhs clean
then rebuild.
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo...
Same for any config repo you use.
That doesn't seem the issue because I would always delete xmonad-new directory and recreate it using $ darcs get xmonad --to-patch=patchname xmonad-new in order to find out which patch broke it. Just in case I just did: $ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an Applicative" xmonad-new and compiled it. Sure enough, xmonad segfaulted on startup.

* Rafael Almeida
On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart
wrote: almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again.
runhaskell Setup.lhs clean
then rebuild.
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo...
Same for any config repo you use.
That doesn't seem the issue because I would always delete xmonad-new directory and recreate it using
$ darcs get xmonad --to-patch=patchname xmonad-new
in order to find out which patch broke it. Just in case I just did:
$ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an Applicative" xmonad-new
and compiled it. Sure enough, xmonad segfaulted on startup.
As far as I see from your config, you also use xmonad contrib library. Have you recompiled it as well? -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

roma:
* Rafael Almeida
[2008-03-06 02:57:16-0300] On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart
wrote: almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again.
runhaskell Setup.lhs clean
then rebuild.
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo...
Same for any config repo you use.
That doesn't seem the issue because I would always delete xmonad-new directory and recreate it using
$ darcs get xmonad --to-patch=patchname xmonad-new
in order to find out which patch broke it. Just in case I just did:
$ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an Applicative" xmonad-new
and compiled it. Sure enough, xmonad segfaulted on startup.
As far as I see from your config, you also use xmonad contrib library. Have you recompiled it as well?
Ah yes, that needs to be fully cleaned and recompiled. And then confirm that without any config file it either is ok, or crashes. -- Don

On Thu, Mar 6, 2008 at 1:41 AM, Don Stewart
roma:
* Rafael Almeida
[2008-03-06 02:57:16-0300] On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart
wrote: almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again.
runhaskell Setup.lhs clean
then rebuild.
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo...
Same for any config repo you use.
That doesn't seem the issue because I would always delete xmonad-new directory and recreate it using
$ darcs get xmonad --to-patch=patchname xmonad-new
in order to find out which patch broke it. Just in case I just did:
$ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an Applicative" xmonad-new
and compiled it. Sure enough, xmonad segfaulted on startup.
As far as I see from your config, you also use xmonad contrib library. Have you recompiled it as well?
Ah yes, that needs to be fully cleaned and recompiled.
And then confirm that without any config file it either is ok, or crashes.
Just to make sure everything is completely clear: every time you rebuild xmonad, you must do a full clean and rebuild of xmonad-contrib. Otherwise it doesn't realize that a library it depends on has changed, and continues referencing the old library, which may or may not cause a crash. =( I'm pretty sure there's no way that simply adding an instance could cause a crash, except for the recompilation problem explained above, or a bug in ghc. -Brent

On Thu, 6 Mar 2008 06:52:00 -0500, "Brent Yorgey"
On Thu, Mar 6, 2008 at 1:41 AM, Don Stewart
wrote: roma: > * Rafael Almeida [2008-03-06 02:57:16-0300] > > On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart wrote: > > > almeidaraf: > > > > > > > Hello, > > > > > > > > I've been using xmonad from darcs. Today I pulled the latest version > > > > and, after compiling xmonad, I found it segfaults during the startup. > > > > I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my > > > > local user. > > > > > > Almost certainly this is because you have a partially recompiled xmonad. > > > Please do a full make clean, then try again. > > > > > > runhaskell Setup.lhs clean > > > > > > then rebuild. > > > > > > http://haskell.org/haskellwiki/Xmonad/ Frequently_asked_questions#Help.21_xmonad_just_segfaulted > > > > > > Same for any config repo you use. > > > > > > > That doesn't seem the issue because I would always delete xmonad- new > > directory and recreate it using > > > > $ darcs get xmonad --to-patch=patchname xmonad-new > > > > in order to find out which patch broke it. Just in case I just did: > > > > $ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an > > Applicative" xmonad-new > > > > and compiled it. Sure enough, xmonad segfaulted on startup. > > As far as I see from your config, you also use xmonad contrib library. > Have you recompiled it as well? Ah yes, that needs to be fully cleaned and recompiled.
And then confirm that without any config file it either is ok, or crashes.
Just to make sure everything is completely clear: every time you rebuild xmonad, you must do a full clean and rebuild of xmonad-contrib. Otherwise it doesn't realize that a library it depends on has changed, and continues referencing the old library, which may or may not cause a crash. =(
I'm pretty sure there's no way that simply adding an instance could cause a crash, except for the recompilation problem explained above, or a bug in ghc.
-Brent
Oh yes. That was indeed the problem here. My bad :(. I was kinda thrown away because I thought you'd never get a Segmentation Fault from a code written in Haskell. But I supose that the error came from the C code on X11, right? Shouldn't it return a nicer error instead of segfaulting? Or is this behaviour expectable?

almeidaraf:
On Thu, 6 Mar 2008 06:52:00 -0500, "Brent Yorgey"
wrote: On Thu, Mar 6, 2008 at 1:41 AM, Don Stewart
wrote: roma: > * Rafael Almeida [2008-03-06 02:57:16-0300] > > On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart wrote: > > > almeidaraf: > > > > > > > Hello, > > > > > > > > I've been using xmonad from darcs. Today I pulled the latest version > > > > and, after compiling xmonad, I found it segfaults during the startup. > > > > I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my > > > > local user. > > > > > > Almost certainly this is because you have a partially recompiled xmonad. > > > Please do a full make clean, then try again. > > > > > > runhaskell Setup.lhs clean > > > > > > then rebuild. > > > > > > http://haskell.org/haskellwiki/Xmonad/ Frequently_asked_questions#Help.21_xmonad_just_segfaulted > > > > > > Same for any config repo you use. > > > > > > > That doesn't seem the issue because I would always delete xmonad- new > > directory and recreate it using > > > > $ darcs get xmonad --to-patch=patchname xmonad-new > > > > in order to find out which patch broke it. Just in case I just did: > > > > $ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an > > Applicative" xmonad-new > > > > and compiled it. Sure enough, xmonad segfaulted on startup. > > As far as I see from your config, you also use xmonad contrib library. > Have you recompiled it as well? Ah yes, that needs to be fully cleaned and recompiled.
And then confirm that without any config file it either is ok, or crashes.
Just to make sure everything is completely clear: every time you rebuild xmonad, you must do a full clean and rebuild of xmonad-contrib. Otherwise it doesn't realize that a library it depends on has changed, and continues referencing the old library, which may or may not cause a crash. =(
I'm pretty sure there's no way that simply adding an instance could cause a crash, except for the recompilation problem explained above, or a bug in ghc.
-Brent
Oh yes. That was indeed the problem here. My bad :(. I was kinda thrown away because I thought you'd never get a Segmentation Fault from a code written in Haskell. But I supose that the error came from the C code on X11, right? Shouldn't it return a nicer error instead of segfaulting? Or is this behaviour expectable?
It actually came from GHC linking code that was compiled against a different API. Due to cross module optimisations, its possible to partially recompile some code, then modify some source, continue compiling and link against an incorrect api. Usually this results in undefined symbols, but occasionally you see somehting like this. If the source changes, via a darcs patch, always best to clean and recompile. :) -- Don

almeidaraf:
On Thu, Mar 6, 2008 at 2:36 AM, Don Stewart
wrote: almeidaraf:
Hello,
I've been using xmonad from darcs. Today I pulled the latest version and, after compiling xmonad, I found it segfaults during the startup. I'm running a debian 4.0 (etch) and I've installed X11 1.4.1 on my local user.
Almost certainly this is because you have a partially recompiled xmonad. Please do a full make clean, then try again.
runhaskell Setup.lhs clean
then rebuild.
http://haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Help.21_xmo...
Same for any config repo you use.
That doesn't seem the issue because I would always delete xmonad-new directory and recreate it using
$ darcs get xmonad --to-patch=patchname xmonad-new
in order to find out which patch broke it. Just in case I just did:
$ darcs get http://code.haskell.org/xmonad --to-patch="Core.hs: add an Applicative" xmonad-new
and compiled it. Sure enough, xmonad segfaulted on startup.
Hmm, ok. We'll need to know more about what your setup is. What OS/arch, what GHC version, what gcc version? And can you attach a full log of the build? -- Don
participants (4)
-
Brent Yorgey
-
Don Stewart
-
Rafael Almeida
-
Roman Cheplyaka