{"action":"created","issue":{"url":"https://api.github.com/repos/cloudwu/skynet/issues/394","labels_url":"https://api.github.com/repos/cloudwu/skynet/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/cloudwu/skynet/issues/394/comments","events_url":"https://api.github.com/repos/cloudwu/skynet/issues/394/events","html_url":"https://github.com/cloudwu/skynet/issues/394","id":119665109,"number":394,"title":"一个关于  yield across a C-call boundary 的问题。","user":{"login":"tangyiyang","id":4645431,"avatar_url":"https://avatars.githubusercontent.com/u/4645431?v=3","gravatar_id":"","url":"https://api.github.com/users/tangyiyang","html_url":"https://github.com/tangyiyang","followers_url":"https://api.github.com/users/tangyiyang/followers","following_url":"https://api.github.com/users/tangyiyang/following{/other_user}","gists_url":"https://api.github.com/users/tangyiyang/gists{/gist_id}","starred_url":"https://api.github.com/users/tangyiyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangyiyang/subscriptions","organizations_url":"https://api.github.com/users/tangyiyang/orgs","repos_url":"https://api.github.com/users/tangyiyang/repos","events_url":"https://api.github.com/users/tangyiyang/events{/privacy}","received_events_url":"https://api.github.com/users/tangyiyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-01T08:18:53Z","updated_at":"2015-12-01T15:24:35Z","closed_at":null,"body":"本来这个应该是和业务相关的，不应该提到这里。\r\n问题：在skynet框架下，哪一些条件下会容易产生yield across a C-call boundary 的问题呢？能详细讲下这个C-call boundary和这个异常产生的原因么？ 嗯，因为项目比较着急，没那么时间深究。这里伸手提问，感谢。:)\r\n\r\n以下这个错误是我在重构项目里的配置文件（项目之前的配置是直接写Lua table里require的）时产生的错误，看起来应该不是multicastd的问题，因为我revert我修改代码回去是正常的。\r\n\r\n[:0100002d] [E], [Tue Dec  1 16:03:32 2015] [Agent] ------- ERROR START ------\r\n[:0100002d] [E], [Tue Dec  1 16:03:32 2015] attempt to yield across a C-call boundary\r\n[:0100002d] [E], [Tue Dec  1 16:03:32 2015] stack traceback:\r\n\t./service/agent.lua:62: in function <./service/agent.lua:59>\r\n\t[C]: in function 'profile.yield'\r\n\t../lib/skynet/lualib/skynet.lua:375: in upvalue 'yield_call'\r\n\t../lib/skynet/lualib/skynet.lua:389: in function 'skynet.call'\r\n\t../lib/skynet/lualib/skynet.lua:530: in function 'skynet.uniqueservice'\r\n\t../lib/skynet/lualib/multicast.lua:93: in local 'f'\r\n\t../lib/skynet/lualib/skynet.lua:591: in function 'skynet.init'\r\n\t../lib/skynet/lualib/multicast.lua:102: in main chunk\r\n\t[C]: in function 'require'\r\n\t./game/handler/user_handler.lua:258: in main chunk\r\n\t[C]: in function 'require'\r\n\t./game/handler/route_handler.lua:19: in function 'route_handler.ctor'\r\n\t./lualib/util/class.lua:23: in function 'route_handler.new'\r\n\t./service/agent.lua:205: in function <./service/agent.lua:197>\r\n\t[C]: in function 'xpcall'\r\n\t./service/agent.lua:262: in upvalue 'f'\r\n\t../lib/skynet/lualib/skynet.lua:110: in function <../lib/skynet/lualib/skynet.lua:104>\r\n[:0100002d] [E], [Tue Dec  1 16:03:32 2015] [Agent] ------- ERROR END ------\r\n[:0100002d] [E], [Tue Dec  1 16:03:32 2015] [Agent] ------- CLOSE ------\r\n[:0100002d] Response message : \"+\r\n[:0100002d] lua call [1000008 to :100002d : 2 msgsz = 5] error : ../lib/skynet/lualib/skynet.lua:519: ../lib/skynet/lualib/skynet.lua:443: Unknown session : 2 from 1000008\r\nstack traceback:\r\n\t[C]: in function 'assert'\r\n\t../lib/skynet/lualib/skynet.lua:519: in function 'skynet.dispatch_message'"},"comment":{"url":"https://api.github.com/repos/cloudwu/skynet/issues/comments/161000306","html_url":"https://github.com/cloudwu/skynet/issues/394#issuecomment-161000306","issue_url":"https://api.github.com/repos/cloudwu/skynet/issues/394","id":161000306,"user":{"login":"tangyiyang","id":4645431,"avatar_url":"https://avatars.githubusercontent.com/u/4645431?v=3","gravatar_id":"","url":"https://api.github.com/users/tangyiyang","html_url":"https://github.com/tangyiyang","followers_url":"https://api.github.com/users/tangyiyang/followers","following_url":"https://api.github.com/users/tangyiyang/following{/other_user}","gists_url":"https://api.github.com/users/tangyiyang/gists{/gist_id}","starred_url":"https://api.github.com/users/tangyiyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tangyiyang/subscriptions","organizations_url":"https://api.github.com/users/tangyiyang/orgs","repos_url":"https://api.github.com/users/tangyiyang/repos","events_url":"https://api.github.com/users/tangyiyang/events{/privacy}","received_events_url":"https://api.github.com/users/tangyiyang/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T15:24:35Z","updated_at":"2015-12-01T15:24:35Z","body":"好吧，发完这个issue之后我好像有点明白了。。。。"}}