Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch ctrl-c to get backtrace of stuck #2032

Merged
merged 5 commits into from
Feb 8, 2022
Merged

catch ctrl-c to get backtrace of stuck #2032

merged 5 commits into from
Feb 8, 2022

Conversation

waruqi
Copy link
Member

@waruqi waruqi commented Feb 7, 2022

test.lua

function main()
    io.read()
end
$ XMAKE_PROFILE=stuck xmake l test.lua
<Ctrl+C>
stack traceback:
        [C]: in function 'base/io.file_read'
        @programdir/core/base/io.lua:177: in method '_read'
        @programdir/core/sandbox/modules/io.lua:90: in function <@programdir/core/sandbox/module
s/io.lua:89>
        (...tail calls...)
        /Users/ruki/share/test.lua:2: in function </Users/ruki/share/test.lua:1>
        (...tail calls...)
        @programdir/plugins/lua/main.lua:123: in function <@programdir/plugins/lua/main.lua:79>
        (...tail calls...)
        [C]: in function 'xpcall'
        @programdir/core/base/utils.lua:280: in function 'sandbox/modules/utils.trycall'
        (...tail calls...)
        @programdir/core/base/task.lua:519: in function 'base/task.run'
        @programdir/core/main.lua:278: in upvalue 'cotask'
        @programdir/core/base/scheduler.lua:371: in function <@programdir/core/base/scheduler.lu
a:368>

#2033

@waruqi waruqi marked this pull request as ready for review February 8, 2022 02:07
@waruqi waruqi added this to the v2.6.4 milestone Feb 8, 2022
@waruqi waruqi merged commit 6b74a4d into dev Feb 8, 2022
@waruqi waruqi deleted the catch branch February 8, 2022 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant