From: Matthieu M. <Mat...@gr...> - 2014-05-04 18:16:18
|
Hi, I'm using notion from Debian, and collapse.lua from here: https://github.com/dkogan/notion-scripts/blob/master/scripts/collapse.lua (move all clients to the same frame and close all other frames, like C-x 1 in Emacs) The last upgrade broke collapse.lua: using it now causes notion to segfault. Below is a valgrind trace. It seems notion doesn't like ioncore.defer( rqclose ) and ioncore.defer( move the managed clients) being called concurrently (my guess is that the order in which ioncore executes stuff changed, and it now tries to close the region before or concurrently to moving clients). I managed to somehow fix detach.lua like this: collapse={} function win_goto(w) return w['goto'](w) end function collapse.take_frame_to_here (region, current) if region ~= current then close_requested = false region:managed_i(function (cwin) io.stderr:write("attach " .. cwin:name() .. " to " .. current:name() .. "\n") ioncore.defer(function() current:attach(cwin) ioncore.defer(function () io.stderr:write("close " .. region:name() .. ".\n") region:rqclose() end) close_requested = true end) return true end) if not close_requested then ioncore.defer(function () io.stderr:write("close empty " .. region:name() .. ".\n") region:rqclose() end) end end return true end function collapse.collapse(ws) local current = ws:current() ws:managed_i (function (region) return collapse.take_frame_to_here(region, current) end) win_goto(current) end (not really happy with my nested ioncore.defer() ...) Can notion be fixed not to segfault in this case? Any lua/notion guru to help me do a cleaner fix? Or is it already the less ugly possible? Or is there a simpler way to achieve the same result? Thanks, And the valgrind trace: ==7319== Conditional jump or move depends on uninitialised value(s) ==7319== at 0x427147: frame_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x4229D8: region_size_hints_correct (in /usr/bin/notion) ==7319== by 0x431BC6: sizepolicy (in /usr/bin/notion) ==7319== by 0x433A5F: group_do_attach_final (in /usr/bin/notion) ==7319== by 0x422021: ??? (in /usr/bin/notion) ==7319== by 0x434F06: group_do_load (in /usr/bin/notion) ==7319== by 0x436C1E: groupws_load (in /usr/bin/notion) ==7319== by 0x426534: create_region_load (in /usr/bin/notion) ==7319== by 0x42200D: ??? (in /usr/bin/notion) ==7319== by 0x42C282: mplex_load_contents (in /usr/bin/notion) ==7319== by 0x41B301: screen_init_layout (in /usr/bin/notion) ==7319== ==7319== Conditional jump or move depends on uninitialised value(s) ==7319== at 0x427157: frame_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x4229D8: region_size_hints_correct (in /usr/bin/notion) ==7319== by 0x431BC6: sizepolicy (in /usr/bin/notion) ==7319== by 0x433A5F: group_do_attach_final (in /usr/bin/notion) ==7319== by 0x422021: ??? (in /usr/bin/notion) ==7319== by 0x434F06: group_do_load (in /usr/bin/notion) ==7319== by 0x436C1E: groupws_load (in /usr/bin/notion) ==7319== by 0x426534: create_region_load (in /usr/bin/notion) ==7319== by 0x42200D: ??? (in /usr/bin/notion) ==7319== by 0x42C282: mplex_load_contents (in /usr/bin/notion) ==7319== by 0x41B301: screen_init_layout (in /usr/bin/notion) ==7319== ==7319== Conditional jump or move depends on uninitialised value(s) ==7319== at 0x427147: frame_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x433DEC: group_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x4229D8: region_size_hints_correct (in /usr/bin/notion) ==7319== by 0x431806: ??? (in /usr/bin/notion) ==7319== by 0x431D67: sizepolicy (in /usr/bin/notion) ==7319== by 0x42B303: mplex_do_attach_final (in /usr/bin/notion) ==7319== by 0x422021: ??? (in /usr/bin/notion) ==7319== by 0x42C282: mplex_load_contents (in /usr/bin/notion) ==7319== by 0x41B301: screen_init_layout (in /usr/bin/notion) ==7319== by 0x42674C: ioncore_init_layout (in /usr/bin/notion) ==7319== ==7319== Conditional jump or move depends on uninitialised value(s) ==7319== at 0x427157: frame_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x433DEC: group_size_hints (in /usr/bin/notion) ==7319== by 0x422332: region_size_hints (in /usr/bin/notion) ==7319== by 0x4229D8: region_size_hints_correct (in /usr/bin/notion) ==7319== by 0x431806: ??? (in /usr/bin/notion) ==7319== by 0x431D67: sizepolicy (in /usr/bin/notion) ==7319== by 0x42B303: mplex_do_attach_final (in /usr/bin/notion) ==7319== by 0x422021: ??? (in /usr/bin/notion) ==7319== by 0x42C282: mplex_load_contents (in /usr/bin/notion) ==7319== by 0x41B301: screen_init_layout (in /usr/bin/notion) ==7319== by 0x42674C: ioncore_init_layout (in /usr/bin/notion) ==7319== attach WGroupCW<1> to WFrame<5> attach WGroupCW<2> to WFrame<5> ==7319== Conditional jump or move depends on uninitialised value(s) ==7319== at 0x4204F5: region_may_dispose (in /usr/bin/notion) ==7319== by 0x420A78: region_rqdispose (in /usr/bin/notion) ==7319== by 0x43B874: mainloop_execute_deferred_on_list (in /usr/bin/notion) ==7319== by 0x4172EA: ioncore_mainloop (in /usr/bin/notion) ==7319== by 0x414F12: main (in /usr/bin/notion) ==7319== ==7319== Jump to the invalid address stated on the next line ==7319== at 0x0: ??? ==7319== by 0x4204FD: region_may_dispose (in /usr/bin/notion) ==7319== by 0x420A78: region_rqdispose (in /usr/bin/notion) ==7319== by 0x43B874: mainloop_execute_deferred_on_list (in /usr/bin/notion) ==7319== by 0x4172EA: ioncore_mainloop (in /usr/bin/notion) ==7319== by 0x414F12: main (in /usr/bin/notion) ==7319== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==7319== notion: Caught fatal signal 11. Dying without deinit. p==7319== ==7319== HEAP SUMMARY: ==7319== in use at exit: 1,781,500 bytes in 14,449 blocks ==7319== total heap usage: 43,029 allocs, 28,580 frees, 5,543,173 bytes allocated ==7319== ==7319== LEAK SUMMARY: ==7319== definitely lost: 224 bytes in 1 blocks ==7319== indirectly lost: 176 bytes in 2 blocks ==7319== possibly lost: 0 bytes in 0 blocks ==7319== still reachable: 1,781,100 bytes in 14,446 blocks ==7319== suppressed: 0 bytes in 0 blocks ==7319== Rerun with --leak-check=full to see details of leaked memory ==7319== ==7319== For counts of detected and suppressed errors, rerun with: -v ==7319== Use --track-origins=yes to see where uninitialised values come from ==7319== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 10 from 3) -- Matthieu Moy http://www-verimag.imag.fr/~moy/ |
From: Dima K. <no...@di...> - 2014-05-09 02:48:26
|
Matthieu Moy <Mat...@gr...> writes: > I'm using notion from Debian > > The last upgrade broke collapse.lua: using it now causes notion to > segfault. Hi. I haven't looked at this yet. But to be clear, are you saying that the latest Debian upgrade (to package version 3+2014010901-1) introduced this regression? dima |
From: Matthieu M. <Mat...@gr...> - 2014-05-09 10:27:47
|
Dima Kogan <no...@di...> writes: > Matthieu Moy <Mat...@gr...> writes: > >> I'm using notion from Debian >> >> The last upgrade broke collapse.lua: using it now causes notion to >> segfault. > > Hi. I haven't looked at this yet. But to be clear, are you saying that > the latest Debian upgrade (to package version 3+2014010901-1) introduced > this regression? That's it, yes. Note that the previous version was 3+2012042300-1 (it seems I missed one upgrade for some reason). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ |
From: Arnout E. <no...@bz...> - 2014-05-11 12:54:37
|
Hi Matthieu, I only managed a quick look, and this does seem to be something in Notion that's not working as indended. I created a ticket at https://sourceforge.net/p/notion/bugs/77/ and noted some preliminary thoughts there. To be continued! Kind regards, Arnout On Tue, May 6, 2014 at 10:05 AM, Matthieu Moy <Mat...@gr...>wrote: > Arnout Engelen <ar...@bz...> writes: > > > Have you tried the latest git version? I suspect this won't have > > the frame_size_hints valgrind errors, though the actual crash you > > describe doesn't sound familiar, so > > that's likely still there. > > It is. The valgrind trace (with freshly git-cloned notion) is below. > > ==15052== Conditional jump or move depends on uninitialised value(s) > ==15052== at 0x41E90E: region_may_dispose (region.c:479) > ==15052== by 0x41ED61: region_rqdispose (region.c:512) > ==15052== by 0x4349AF: mainloop_execute_deferred_on_list (defer.c:191) > ==15052== by 0x416D44: ioncore_mainloop (event.c:228) > ==15052== by 0x41519B: main (notion.c:281) > ==15052== > ==15052== Jump to the invalid address stated on the next line > ==15052== at 0x0: ??? > ==15052== by 0x41E916: region_may_dispose (region.c:479) > ==15052== by 0x41ED61: region_rqdispose (region.c:512) > ==15052== by 0x4349AF: mainloop_execute_deferred_on_list (defer.c:191) > ==15052== by 0x416D44: ioncore_mainloop (event.c:228) > ==15052== by 0x41519B: main (notion.c:281) > ==15052== Address 0x0 is not stack'd, malloc'd or (recently) free'd > ==15052== > ==15052== > ==15052== Process terminating with default action of signal 11 (SIGSEGV) > ==15052== Bad permissions for mapped region at address 0x0 > ==15052== at 0x0: ??? > ==15052== by 0x41E916: region_may_dispose (region.c:479) > ==15052== by 0x41ED61: region_rqdispose (region.c:512) > ==15052== by 0x4349AF: mainloop_execute_deferred_on_list (defer.c:191) > ==15052== by 0x416D44: ioncore_mainloop (event.c:228) > ==15052== by 0x41519B: main (notion.c:281) > ==15052== > ==15052== HEAP SUMMARY: > ==15052== in use at exit: 1,707,258 bytes in 13,962 blocks > ==15052== total heap usage: 42,694 allocs, 28,732 frees, 5,525,276 bytes > allocated > ==15052== > ==15052== LEAK SUMMARY: > ==15052== definitely lost: 224 bytes in 1 blocks > ==15052== indirectly lost: 176 bytes in 2 blocks > ==15052== possibly lost: 0 bytes in 0 blocks > ==15052== still reachable: 1,706,858 bytes in 13,959 blocks > ==15052== suppressed: 0 bytes in 0 blocks > ==15052== Rerun with --leak-check=full to see details of leaked memory > ==15052== > ==15052== For counts of detected and suppressed errors, rerun with: -v > ==15052== Use --track-origins=yes to see where uninitialised values come > from > ==15052== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 3 from 3) > ==15067== Memcheck, a memory error detector > ==15067== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. > ==15067== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info > ==15067== Command: /home/moy/local/usr/bin/notion > ==15067== > > -- > Matthieu Moy > http://www-verimag.imag.fr/~moy/ > |
From: Arnout E. <no...@bz...> - 2014-05-14 21:44:35
|
Hi Matthieu, Thanks for the pointer. I've been to run the script and kind of reproduce the problem: for me notion didn't crash outright but ended up in an infinite loop - not much better :). Upon inspection this seems to be a bona fide pointer arithmetic bug that's been lurking there since before 2005. I think this should now be fixed on git master HEAD, can you verify it indeed works for you, too? Kind regards, Arnout On Tue, May 13, 2014 at 8:35 AM, Matthieu Moy <Mat...@gr...>wrote: > Arnout Engelen <ar...@bz...> writes: > > > On Sun, May 4, 2014 at 7:47 PM, Matthieu Moy < > Mat...@gr...> wrote: > > > > I'm using notion from Debian, and collapse.lua from here: > > > https://github.com/dkogan/notion-scripts/blob/master/scripts/collapse.lua > > (move all clients to the same frame and close all other frames, like > C-x > > 1 in Emacs) > > > > The last upgrade broke collapse.lua: using it now causes notion to > > segfault. > > > > Can you explain how exactly you invoke this script? I can't really seem > to reproduce the crash (or make the > > script do anything useful, actually). > > A looong time I wrote this config, and I don't remember how it > works ;-). > > I use emacs-bindings.lua and collapse.lua together: > > > https://github.com/dkogan/notion-scripts/blob/master/keybindings/emacs_bindings.lua > > (essentially, I get the same split/join/... behavior for notion and for > Emacs, just shifting my thumb from the Alt_L key to the Super_L key) > > The relevant part is: > > Emacs.WTiling_X = { > kpress ("AnyModifier+1", "collapse.collapse(_)"), > } > > Emacs.WTiling = { > submap(META.."x", Emacs.WTiling_X), > } > > defbindings("WTiling", Emacs.WTiling) > > Then, split your workspaces in any way, type Control-x 1 and you'll get > a single split with all frames attached to it. > > > In the mean time, can you try and reproduce the problem with > > the debug_defer_crash git branch? This should no longer crash notion, > > but spew out all kinds of diagnostics. > > No time today, but I'll try when I get time. > > -- > Matthieu Moy > http://www-verimag.imag.fr/~moy/ > |
From: Wojciech A. <ani...@co...> - 2014-05-15 10:35:16
Attachments:
signature.asc
|
Salut, I got as far as: /collapse.lua:23: <name> expected near 'goto' so I guess I'm way off:) regards w On Wed, May 14, 2014 at 11:44:27PM +0200, Arnout Engelen wrote: > Hi Matthieu, > > Thanks for the pointer. I've been to run the script and kind of reproduce > the problem: for me notion didn't crash outright but ended up in an > infinite loop - not much better :). > > Upon inspection this seems to be a bona fide pointer arithmetic bug that's > been lurking there since before 2005. > > I think this should now be fixed on git master HEAD, can you verify it > indeed works for you, too? > > > Kind regards, > > Arnout > > > On Tue, May 13, 2014 at 8:35 AM, Matthieu Moy > <Mat...@gr...>wrote: > > > Arnout Engelen <ar...@bz...> writes: > > > > > On Sun, May 4, 2014 at 7:47 PM, Matthieu Moy < > > Mat...@gr...> wrote: > > > > > > I'm using notion from Debian, and collapse.lua from here: > > > > > https://github.com/dkogan/notion-scripts/blob/master/scripts/collapse.lua > > > (move all clients to the same frame and close all other frames, like > > C-x > > > 1 in Emacs) > > > > > > The last upgrade broke collapse.lua: using it now causes notion to > > > segfault. > > > > > > Can you explain how exactly you invoke this script? I can't really seem > > to reproduce the crash (or make the > > > script do anything useful, actually). > > > > A looong time I wrote this config, and I don't remember how it > > works ;-). > > > > I use emacs-bindings.lua and collapse.lua together: > > > > > > https://github.com/dkogan/notion-scripts/blob/master/keybindings/emacs_bindings.lua > > > > (essentially, I get the same split/join/... behavior for notion and for > > Emacs, just shifting my thumb from the Alt_L key to the Super_L key) > > > > The relevant part is: > > > > Emacs.WTiling_X = { > > kpress ("AnyModifier+1", "collapse.collapse(_)"), > > } > > > > Emacs.WTiling = { > > submap(META.."x", Emacs.WTiling_X), > > } > > > > defbindings("WTiling", Emacs.WTiling) > > > > Then, split your workspaces in any way, type Control-x 1 and you'll get > > a single split with all frames attached to it. > > > > > In the mean time, can you try and reproduce the problem with > > > the debug_defer_crash git branch? This should no longer crash notion, > > > but spew out all kinds of diagnostics. > > > > No time today, but I'll try when I get time. > > > > -- > > Matthieu Moy > > http://www-verimag.imag.fr/~moy/ > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Notion-general mailing list > Not...@li... > https://lists.sourceforge.net/lists/listinfo/notion-general -- Wojtek Aniszewski [Eng: voyteck aanishevsky] [Fr: vôytek anichévsky] /^..^\ ,-------------------------------------, ( (••) ) ----| My public GPG key ID: AC66485E | (|)_._(|)~ | please use email encryption! | `-------------------------------------" |
From: Arnout E. <no...@bz...> - 2014-05-15 10:19:00
|
Hello Wojciech, The version of collapse.lua you appear to be using doesn't work with lua 5.2. You can either downgrade lua or get an updated version of the script from https://sourceforge.net/p/notion/notion/ci/master/tree/contrib/scripts/ Kind regards, Arnout On Thu, May 15, 2014 at 12:04 PM, Wojciech Aniszewski <ani...@co...>wrote: > Salut, > > I got as far as: > /collapse.lua:23: <name> expected near 'goto' > > so I guess I'm way off:) > regards > w > > > On Wed, May 14, 2014 at 11:44:27PM +0200, Arnout Engelen wrote: > > Hi Matthieu, > > > > Thanks for the pointer. I've been to run the script and kind of reproduce > > the problem: for me notion didn't crash outright but ended up in an > > infinite loop - not much better :). > > > > Upon inspection this seems to be a bona fide pointer arithmetic bug > that's > > been lurking there since before 2005. > > > > I think this should now be fixed on git master HEAD, can you verify it > > indeed works for you, too? > > > > > > Kind regards, > > > > Arnout > > > > > > On Tue, May 13, 2014 at 8:35 AM, Matthieu Moy > > <Mat...@gr...>wrote: > > > > > Arnout Engelen <ar...@bz...> writes: > > > > > > > On Sun, May 4, 2014 at 7:47 PM, Matthieu Moy < > > > Mat...@gr...> wrote: > > > > > > > > I'm using notion from Debian, and collapse.lua from here: > > > > > > > > https://github.com/dkogan/notion-scripts/blob/master/scripts/collapse.lua > > > > (move all clients to the same frame and close all other frames, > like > > > C-x > > > > 1 in Emacs) > > > > > > > > The last upgrade broke collapse.lua: using it now causes notion > to > > > > segfault. > > > > > > > > Can you explain how exactly you invoke this script? I can't really > seem > > > to reproduce the crash (or make the > > > > script do anything useful, actually). > > > > > > A looong time I wrote this config, and I don't remember how it > > > works ;-). > > > > > > I use emacs-bindings.lua and collapse.lua together: > > > > > > > > > > https://github.com/dkogan/notion-scripts/blob/master/keybindings/emacs_bindings.lua > > > > > > (essentially, I get the same split/join/... behavior for notion and for > > > Emacs, just shifting my thumb from the Alt_L key to the Super_L key) > > > > > > The relevant part is: > > > > > > Emacs.WTiling_X = { > > > kpress ("AnyModifier+1", "collapse.collapse(_)"), > > > } > > > > > > Emacs.WTiling = { > > > submap(META.."x", Emacs.WTiling_X), > > > } > > > > > > defbindings("WTiling", Emacs.WTiling) > > > > > > Then, split your workspaces in any way, type Control-x 1 and you'll get > > > a single split with all frames attached to it. > > > > > > > In the mean time, can you try and reproduce the problem with > > > > the debug_defer_crash git branch? This should no longer crash notion, > > > > but spew out all kinds of diagnostics. > > > > > > No time today, but I'll try when I get time. > > > > > > -- > > > Matthieu Moy > > > http://www-verimag.imag.fr/~moy/ > > > > > > > ------------------------------------------------------------------------------ > > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > > Instantly run your Selenium tests across 300+ browser/OS combos. > > Get unparalleled scalability from the best Selenium testing platform > available > > Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > > Notion-general mailing list > > Not...@li... > > https://lists.sourceforge.net/lists/listinfo/notion-general > > > -- > Wojtek Aniszewski > [Eng: voyteck aanishevsky] > [Fr: vôytek anichévsky] > > /^..^\ ,-------------------------------------, > ( (••) ) ----| My public GPG key ID: AC66485E | > (|)_._(|)~ | please use email encryption! | > `-------------------------------------" > |
From: Matthieu M. <Mat...@gr...> - 2014-05-16 21:04:41
|
Arnout Engelen <no...@bz...> writes: > I think this should now be fixed on git master HEAD, can you verify it indeed > works for you, too? It seems to be fixed, indeed. Thanks a lot! -- Matthieu Moy http://www-verimag.imag.fr/~moy/ |