调试 – gdb:找不到新的线程:通用的错误

当我对加载链接到pthreads的.so的程序运行GDB时,GDB报告错误“无法找到新线程:通用错误”。

注意,我运行的可执行文件没有链接到pthreads。

任何线索?

$ gdb --args lua -lluarocks.require
GNU gdb (GDB) 7.0-ubuntu
copyright (C) 2009 Free Software Foundation,Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY,to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions,please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/lua...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/lua -lluarocks.require
Lua 5.1.4  copyright (C) 1994-2008 Lua.org,PUC-Rio
> require 'ev'
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb) q
A debugging session is active.

    Inferior 1 [process 4986] will be killed.

Quit anyway? (y or n) y

这个函数调用require’ev’:

http://github.com/brimworks/lua-ev/blob/master/lua_ev.c#L25-65

有关我的系统的其他信息:

$ uname -a
Linux localhost 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
distributor ID: Ubuntu
Description:    Ubuntu 9.10
Release:    9.10
Codename:   karmic
这也工作:

LD_PRELOAD = / lib / libpthread.so.0 gdb –args ./app

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...