본문으로 건너뛰기

이메일 #181 - #185

원본 출처: Satoshi - Sirius emails 2009-2011

이메일 #181

Date: Wed, 03 Mar 2010 14:32:01 +0200
From: [email protected]
To: Satoshi Nakamoto <[email protected]>
Subject: Re: Bitcoind

한글 번역

debug.log를 첨부합니다.

범위가 많이 좁혀졌네요. debug.log에 IRC 관련 동작이 전혀 출력되지 않았으니 RecvUntil을 통과하지 못했을 겁니다. 대충 훑어봐도 눈에 띄는 문제는 안 보이네요. ConnectSocket이나 RecvUntil 중 하나에 있을 수밖에 없을 것 같아요.

첨부한 irc.cpp와 net.cpp로 실행해 보고 debug.log를 보내주세요.

아니면 gdb로 실행하면서 ThreadIRCSeed를 한 단계씩 따라가 볼 수도 있어요. gdb --args bitcoin [switches] b ThreadIRCSeed run step 또는 u로 루틴을 건너뛰거나 위로 빠져나오면 됩니다.

[email protected] 씀:

getinfo를 하든 안 하든 오류가 납니다. ThreadIRCSeed를 주석 처리하니 문제가 해결됐습니다.

getinfo를 하지 않아도 여전히 그런가요?

아래에 나열된 CreateThread들을 주석 처리한 다음, 다시 증상이 나타날 때까지 하나씩 다시 켜 보세요. 그러면 문제가 어느 스레드에 있는지 알 수 있을 겁니다.

net.cpp, // Start threads 아래 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

[email protected] 씀:

자, 여기 있습니다. 충돌 오류 메시지를 빼먹었네요:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

debug.log를 보내주실 수 있나요?

[email protected] 씀:

제 빌드의 bitcoind를 ddd 디버거로 디버깅해 봤는데 아직 별 성과가 없네요. 항상 시스템 메모리를 전부 잡아먹고 결국 충돌합니다. 64비트용 최신 bitcoind 빌드를 다시 보내주셔서 제 빌드 문제인지 확인할 수 있을까요?

영어 원문

debug.log attached

> That narrows it down a lot. It didn't print any IRC activity in
> debug.log, so I guess it couldn't have gotten past the RecvUntil.
> Eyeballing it I don't see anything obvious. I guess it would have to
> be either in ConnectSocket or RecvUntil.
>
> Try it with the attached irc.cpp and net.cpp and send me the debug.log.
>
> Or you could run it in gdb and step through ThreadIRCSeed
> gdb --args bitcoin [switches]
> b ThreadIRCSeed
> run
> step
> or u to step over and up out of routines.
>
> [email protected] wrote:
>> I get the error regardless of the getinfo. Commenting out
>> ThreadIRCSeed fixed the problem.
>>
>>> Does it still do it if you didn't do getinfo?
>>>
>>> You could comment out the CreateThreads listed below, then re-enable
>>> them one at a time until it does it again. Then we would know which
>>> thread the problem is in.
>>>
>>> net.cpp, under // Start threads
>>> CreateThread(ThreadIRCSeed, NULL)
>>> CreateThread(ThreadSocketHandler, NULL, true)
>>> CreateThread(ThreadOpenConnections, NULL)
>>> CreateThread(ThreadMessageHandler, NULL)
>>>
>>> init.cpp:
>>> CreateThread(ThreadRPCServer, NULL);
>>>
>>> [email protected] wrote:
>>>> Here goes. I forgot to mention the crash error message:
>>>>
>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>> what(): std::bad_alloc
>>>>
>>>>> Could you send me the debug.log?
>>>>>
>>>>> [email protected] wrote:
>>>>>> I tried debugging my build of bitcoind with ddd debugger, but
>>>>>> didn't have much success yet. It always ends up taking all the
>>>>>> system's memory and finally crashes. Could you please send
>>>>>> me again the latest 64 bit build of bitcoind, so I can see
>>>>>> if the problem is about my build?
>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>

이메일 #182

Date: Wed, 03 Mar 2010 17:15:28 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Bitcoind
To: [email protected]

한글 번역

RecvUntil 안에 있네요. 그래도 뭐가 잘못됐는지는 여전히 안 보이네요. 생각할 수 있는 거라곤 소켓이 문자들을 마구 쏟아지듯 받고 있는 경우뿐입니다.

이번 irc.cpp로 해보세요. debug.log가 급격히 커질 수 있으니 바로 종료시킬 준비를 하세요.

debug.log를 첨부합니다.

범위가 많이 좁혀졌네요. debug.log에 IRC 관련 동작이 전혀 출력되지 않았으니 RecvUntil을 통과하지 못했을 겁니다. 대충 훑어봐도 눈에 띄는 문제는 안 보이네요. ConnectSocket이나 RecvUntil 중 하나에 있을 수밖에 없을 것 같아요.

첨부한 irc.cpp와 net.cpp로 실행해 보고 debug.log를 보내주세요.

아니면 gdb로 실행하면서 ThreadIRCSeed를 한 단계씩 따라가 볼 수도 있어요. gdb --args bitcoin [switches] b ThreadIRCSeed run step 또는 u로 루틴을 건너뛰거나 위로 빠져나오면 됩니다.

[email protected] 씀:

getinfo를 하든 안 하든 오류가 납니다. ThreadIRCSeed를 주석 처리하니 문제가 해결됐습니다.

getinfo를 하지 않아도 여전히 그런가요?

아래에 나열된 CreateThread들을 주석 처리한 다음, 다시 증상이 나타날 때까지 하나씩 다시 켜 보세요. 그러면 문제가 어느 스레드에 있는지 알 수 있을 겁니다.

net.cpp, // Start threads 아래 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

[email protected] 씀:

자, 여기 있습니다. 충돌 오류 메시지를 빼먹었네요:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

debug.log를 보내주실 수 있나요?

[email protected] 씀:

제 빌드의 bitcoind를 ddd 디버거로 디버깅해 봤는데 아직 별 성과가 없네요. 항상 시스템 메모리를 전부 잡아먹고 결국 충돌합니다. 64비트용 최신 bitcoind 빌드를 다시 보내주셔서 제 빌드 문제인지 확인할 수 있을까요?

영어 원문

It's in RecvUntil, but I still can't see anything wrong with it.  The 
only thing I can think of is if the socket is receiving a spew of
characters.

Try this irc.cpp. debug.log may grow rapidly so be ready to kill it.

[email protected] wrote:
> debug.log attached
>
>> That narrows it down a lot. It didn't print any IRC activity in
>> debug.log, so I guess it couldn't have gotten past the RecvUntil.
>> Eyeballing it I don't see anything obvious. I guess it would have to
>> be either in ConnectSocket or RecvUntil.
>>
>> Try it with the attached irc.cpp and net.cpp and send me the debug.log.
>>
>> Or you could run it in gdb and step through ThreadIRCSeed
>> gdb --args bitcoin [switches]
>> b ThreadIRCSeed
>> run
>> step
>> or u to step over and up out of routines.
>>
>> [email protected] wrote:
>>> I get the error regardless of the getinfo. Commenting out
>>> ThreadIRCSeed fixed the problem.
>>>
>>>> Does it still do it if you didn't do getinfo?
>>>>
>>>> You could comment out the CreateThreads listed below, then re-enable
>>>> them one at a time until it does it again. Then we would know which
>>>> thread the problem is in.
>>>>
>>>> net.cpp, under // Start threads
>>>> CreateThread(ThreadIRCSeed, NULL)
>>>> CreateThread(ThreadSocketHandler, NULL, true)
>>>> CreateThread(ThreadOpenConnections, NULL)
>>>> CreateThread(ThreadMessageHandler, NULL)
>>>>
>>>> init.cpp:
>>>> CreateThread(ThreadRPCServer, NULL);
>>>>
>>>> [email protected] wrote:
>>>>> Here goes. I forgot to mention the crash error message:
>>>>>
>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>> what(): std::bad_alloc
>>>>>
>>>>>> Could you send me the debug.log?
>>>>>>
>>>>>> [email protected] wrote:
>>>>>>> I tried debugging my build of bitcoind with ddd debugger, but
>>>>>>> didn't have much success yet. It always ends up taking all the
>>>>>>> system's memory and finally crashes. Could you please send
>>>>>>> me again the latest 64 bit build of bitcoind, so I can see if
>>>>>>> the problem is about my build?
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
>

이메일 #183

Date: Fri, 05 Mar 2010 00:27:08 +0200
From: [email protected]
To: Satoshi Nakamoto <[email protected]>
Subject: Re: Bitcoind

한글 번역

debug.log입니다. 메모리를 전부 차지하기 전에 bitcoind를 멈췄습니다.

RecvUntil 안에 있네요. 그래도 뭐가 잘못됐는지는 여전히 안 보이네요. 생각할 수 있는 거라곤 소켓이 문자들을 마구 쏟아지듯 받고 있는 경우뿐입니다.

이번 irc.cpp로 해보세요. debug.log가 급격히 커질 수 있으니 바로 종료시킬 준비를 하세요.

[email protected] 씀:

debug.log를 첨부합니다.

범위가 많이 좁혀졌네요. debug.log에 IRC 관련 동작이 전혀 출력되지 않았으니 RecvUntil을 통과하지 못했을 겁니다. 대충 훑어봐도 눈에 띄는 문제는 안 보이네요. ConnectSocket이나 RecvUntil 중 하나에 있을 수밖에 없을 것 같아요.

첨부한 irc.cpp와 net.cpp로 실행해 보고 debug.log를 보내주세요.

아니면 gdb로 실행하면서 ThreadIRCSeed를 한 단계씩 따라가 볼 수도 있어요. gdb --args bitcoin [switches] b ThreadIRCSeed run step 또는 u로 루틴을 건너뛰거나 위로 빠져나오면 됩니다.

[email protected] 씀:

getinfo를 하든 안 하든 오류가 납니다. ThreadIRCSeed를 주석 처리하니 문제가 해결됐습니다.

getinfo를 하지 않아도 여전히 그런가요?

아래에 나열된 CreateThread들을 주석 처리한 다음, 다시 증상이 나타날 때까지 하나씩 다시 켜 보세요. 그러면 문제가 어느 스레드에 있는지 알 수 있을 겁니다.

net.cpp, // Start threads 아래 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

[email protected] 씀:

자, 여기 있습니다. 충돌 오류 메시지를 빼먹었네요:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

debug.log를 보내주실 수 있나요?

[email protected] 씀:

제 빌드의 bitcoind를 ddd 디버거로 디버깅해 봤는데 아직 별 성과가 없네요. 항상 시스템 메모리를 전부 잡아먹고 결국 충돌합니다. 64비트용 최신 bitcoind 빌드를 다시 보내주셔서 제 빌드 문제인지 확인할 수 있을까요?

영어 원문

Here's the debug.log. I stopped bitcoind before it took up all the memory.

> It's in RecvUntil, but I still can't see anything wrong with it. The
> only thing I can think of is if the socket is receiving a spew of
> characters.
>
> Try this irc.cpp. debug.log may grow rapidly so be ready to kill it.
>
> [email protected] wrote:
>> debug.log attached
>>
>>> That narrows it down a lot. It didn't print any IRC activity in
>>> debug.log, so I guess it couldn't have gotten past the RecvUntil.
>>> Eyeballing it I don't see anything obvious. I guess it would have to
>>> be either in ConnectSocket or RecvUntil.
>>>
>>> Try it with the attached irc.cpp and net.cpp and send me the debug.log.
>>>
>>> Or you could run it in gdb and step through ThreadIRCSeed
>>> gdb --args bitcoin [switches]
>>> b ThreadIRCSeed
>>> run
>>> step
>>> or u to step over and up out of routines.
>>>
>>> [email protected] wrote:
>>>> I get the error regardless of the getinfo. Commenting out
>>>> ThreadIRCSeed fixed the problem.
>>>>
>>>>> Does it still do it if you didn't do getinfo?
>>>>>
>>>>> You could comment out the CreateThreads listed below, then re-enable
>>>>> them one at a time until it does it again. Then we would know which
>>>>> thread the problem is in.
>>>>>
>>>>> net.cpp, under // Start threads
>>>>> CreateThread(ThreadIRCSeed, NULL)
>>>>> CreateThread(ThreadSocketHandler, NULL, true)
>>>>> CreateThread(ThreadOpenConnections, NULL)
>>>>> CreateThread(ThreadMessageHandler, NULL)
>>>>>
>>>>> init.cpp:
>>>>> CreateThread(ThreadRPCServer, NULL);
>>>>>
>>>>> [email protected] wrote:
>>>>>> Here goes. I forgot to mention the crash error message:
>>>>>>
>>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>>> what(): std::bad_alloc
>>>>>>
>>>>>>> Could you send me the debug.log?
>>>>>>>
>>>>>>> [email protected] wrote:
>>>>>>>> I tried debugging my build of bitcoind with ddd debugger, but
>>>>>>>> didn't have much success yet. It always ends up taking
>>>>>>>> all the system's memory and finally crashes. Could you
>>>>>>>> please send me again the latest 64 bit build of bitcoind,
>>>>>>>> so I can see if the problem is about my build?
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>

이메일 #184

Date: Fri, 05 Mar 2010 02:09:02 +0200
From: [email protected]
To: Satoshi Nakamoto <[email protected]>
Subject: Re: Bitcoind

한글 번역

gdb로 디버깅하면서 얻은 또 다른 테스트 실행의 debug.log입니다. 프로그램이 "irc 8"이라는 디버그 줄이 나온 뒤부터 메모리를 잡아먹기 시작하더니 몇 초 안에 "terminate called after throwing an instance of 'std::bad_alloc'" 오류를 내며 충돌했습니다.

RecvUntil 안에 있네요. 그래도 뭐가 잘못됐는지는 여전히 안 보이네요. 생각할 수 있는 거라곤 소켓이 문자들을 마구 쏟아지듯 받고 있는 경우뿐입니다.

이번 irc.cpp로 해보세요. debug.log가 급격히 커질 수 있으니 바로 종료시킬 준비를 하세요.

[email protected] 씀:

debug.log를 첨부합니다.

범위가 많이 좁혀졌네요. debug.log에 IRC 관련 동작이 전혀 출력되지 않았으니 RecvUntil을 통과하지 못했을 겁니다. 대충 훑어봐도 눈에 띄는 문제는 안 보이네요. ConnectSocket이나 RecvUntil 중 하나에 있을 수밖에 없을 것 같아요.

첨부한 irc.cpp와 net.cpp로 실행해 보고 debug.log를 보내주세요.

아니면 gdb로 실행하면서 ThreadIRCSeed를 한 단계씩 따라가 볼 수도 있어요. gdb --args bitcoin [switches] b ThreadIRCSeed run step 또는 u로 루틴을 건너뛰거나 위로 빠져나오면 됩니다.

[email protected] 씀:

getinfo를 하든 안 하든 오류가 납니다. ThreadIRCSeed를 주석 처리하니 문제가 해결됐습니다.

getinfo를 하지 않아도 여전히 그런가요?

아래에 나열된 CreateThread들을 주석 처리한 다음, 다시 증상이 나타날 때까지 하나씩 다시 켜 보세요. 그러면 문제가 어느 스레드에 있는지 알 수 있을 겁니다.

net.cpp, // Start threads 아래 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

[email protected] 씀:

자, 여기 있습니다. 충돌 오류 메시지를 빼먹었네요:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

debug.log를 보내주실 수 있나요?

[email protected] 씀:

제 빌드의 bitcoind를 ddd 디버거로 디버깅해 봤는데 아직 별 성과가 없네요. 항상 시스템 메모리를 전부 잡아먹고 결국 충돌합니다. 64비트용 최신 bitcoind 빌드를 다시 보내주셔서 제 빌드 문제인지 확인할 수 있을까요?

영어 원문

Here's another test run debug.log I got when debugging with gdb. The  
program started eating memory after the debug line "irc 8" and within
a few seconds crashed with "terminate called after throwing an
instance of 'std::bad_alloc'".

> It's in RecvUntil, but I still can't see anything wrong with it. The
> only thing I can think of is if the socket is receiving a spew of
> characters.
>
> Try this irc.cpp. debug.log may grow rapidly so be ready to kill it.
>
> [email protected] wrote:
>> debug.log attached
>>
>>> That narrows it down a lot. It didn't print any IRC activity in
>>> debug.log, so I guess it couldn't have gotten past the RecvUntil.
>>> Eyeballing it I don't see anything obvious. I guess it would have to
>>> be either in ConnectSocket or RecvUntil.
>>>
>>> Try it with the attached irc.cpp and net.cpp and send me the debug.log.
>>>
>>> Or you could run it in gdb and step through ThreadIRCSeed
>>> gdb --args bitcoin [switches]
>>> b ThreadIRCSeed
>>> run
>>> step
>>> or u to step over and up out of routines.
>>>
>>> [email protected] wrote:
>>>> I get the error regardless of the getinfo. Commenting out
>>>> ThreadIRCSeed fixed the problem.
>>>>
>>>>> Does it still do it if you didn't do getinfo?
>>>>>
>>>>> You could comment out the CreateThreads listed below, then re-enable
>>>>> them one at a time until it does it again. Then we would know which
>>>>> thread the problem is in.
>>>>>
>>>>> net.cpp, under // Start threads
>>>>> CreateThread(ThreadIRCSeed, NULL)
>>>>> CreateThread(ThreadSocketHandler, NULL, true)
>>>>> CreateThread(ThreadOpenConnections, NULL)
>>>>> CreateThread(ThreadMessageHandler, NULL)
>>>>>
>>>>> init.cpp:
>>>>> CreateThread(ThreadRPCServer, NULL);
>>>>>
>>>>> [email protected] wrote:
>>>>>> Here goes. I forgot to mention the crash error message:
>>>>>>
>>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>>> what(): std::bad_alloc
>>>>>>
>>>>>>> Could you send me the debug.log?
>>>>>>>
>>>>>>> [email protected] wrote:
>>>>>>>> I tried debugging my build of bitcoind with ddd debugger, but
>>>>>>>> didn't have much success yet. It always ends up taking
>>>>>>>> all the system's memory and finally crashes. Could you
>>>>>>>> please send me again the latest 64 bit build of bitcoind,
>>>>>>>> so I can see if the problem is about my build?
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>

이메일 #185

Date: Fri, 05 Mar 2010 00:42:16 +0000
From: Satoshi Nakamoto <[email protected]>
Subject: Re: Bitcoind
To: [email protected]

한글 번역

util.c의 ParseString 안에 있네요. "unsigned int" 타입과 str.npos의 타입인 size_type 사이의 비호환성이 문제일 거라고 추측합니다.

두 개의 "unsigned int"를 "size_type"으로 바꿔보세요.

old: void ParseString(const string& str, char c, vector<string>& v) { unsigned int i1 = 0; unsigned int i2; do { i2 = str.find(c, i1); v.push_back(str.substr(i1, i2-i1)); i1 = i2+1; } while (i2 != str.npos); }

new: void ParseString(const string& str, char c, vector<string>& v) { size_type i1 = 0; size_type i2; do { i2 = str.find(c, i1); v.push_back(str.substr(i1, i2-i1)); i1 = i2+1; } while (i2 != str.npos); }

[email protected] 씀:

gdb로 디버깅하면서 얻은 또 다른 테스트 실행의 debug.log입니다. 프로그램이 "irc 8"이라는 디버그 줄이 나온 뒤부터 메모리를 잡아먹기 시작하더니 몇 초 안에 "terminate called after throwing an instance of 'std::bad_alloc'" 오류를 내며 충돌했습니다.

RecvUntil 안에 있네요. 그래도 뭐가 잘못됐는지는 여전히 안 보이네요. 생각할 수 있는 거라곤 소켓이 문자들을 마구 쏟아지듯 받고 있는 경우뿐입니다.

이번 irc.cpp로 해보세요. debug.log가 급격히 커질 수 있으니 바로 종료시킬 준비를 하세요.

[email protected] 씀:

debug.log를 첨부합니다.

범위가 많이 좁혀졌네요. debug.log에 IRC 관련 동작이 전혀 출력되지 않았으니 RecvUntil을 통과하지 못했을 겁니다. 대충 훑어봐도 눈에 띄는 문제는 안 보이네요. ConnectSocket이나 RecvUntil 중 하나에 있을 수밖에 없을 것 같아요.

첨부한 irc.cpp와 net.cpp로 실행해 보고 debug.log를 보내주세요.

아니면 gdb로 실행하면서 ThreadIRCSeed를 한 단계씩 따라가 볼 수도 있어요. gdb --args bitcoin [switches] b ThreadIRCSeed run step 또는 u로 루틴을 건너뛰거나 위로 빠져나오면 됩니다.

[email protected] 씀:

getinfo를 하든 안 하든 오류가 납니다. ThreadIRCSeed를 주석 처리하니 문제가 해결됐습니다.

getinfo를 하지 않아도 여전히 그런가요?

아래에 나열된 CreateThread들을 주석 처리한 다음, 다시 증상이 나타날 때까지 하나씩 다시 켜 보세요. 그러면 문제가 어느 스레드에 있는지 알 수 있을 겁니다.

net.cpp, // Start threads 아래 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

[email protected] 씀:

자, 여기 있습니다. 충돌 오류 메시지를 빼먹었네요:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

debug.log를 보내주실 수 있나요?

[email protected] 씀:

제 빌드의 bitcoind를 ddd 디버거로 디버깅해 봤는데 아직 별 성과가 없네요. 항상 시스템 메모리를 전부 잡아먹고 결국 충돌합니다. 64비트용 최신 bitcoind 빌드를 다시 보내주셔서 제 빌드 문제인지 확인할 수 있을까요?

영어 원문

It's in util.c ParseString.  I'm guessing the problem is incompatibility 
between the type "unsigned int" and the type of str.npos, which is
size_type.

Try changing the two "unsigned int"s to "size_type".

old:
void ParseString(const string& str, char c, vector<string>& v)
{
unsigned int i1 = 0;
unsigned int i2;
do
{
i2 = str.find(c, i1);
v.push_back(str.substr(i1, i2-i1));
i1 = i2+1;
}
while (i2 != str.npos);
}

new:
void ParseString(const string& str, char c, vector<string>& v)
{
size_type i1 = 0;
size_type i2;
do
{
i2 = str.find(c, i1);
v.push_back(str.substr(i1, i2-i1));
i1 = i2+1;
}
while (i2 != str.npos);
}


[email protected] wrote:
> Here's another test run debug.log I got when debugging with gdb. The
> program started eating memory after the debug line "irc 8" and within a
> few seconds crashed with "terminate called after throwing an instance of
> 'std::bad_alloc'".
>
>> It's in RecvUntil, but I still can't see anything wrong with it. The
>> only thing I can think of is if the socket is receiving a spew of
>> characters.
>>
>> Try this irc.cpp. debug.log may grow rapidly so be ready to kill it.
>>
>> [email protected] wrote:
>>> debug.log attached
>>>
>>>> That narrows it down a lot. It didn't print any IRC activity in
>>>> debug.log, so I guess it couldn't have gotten past the RecvUntil.
>>>> Eyeballing it I don't see anything obvious. I guess it would have to
>>>> be either in ConnectSocket or RecvUntil.
>>>>
>>>> Try it with the attached irc.cpp and net.cpp and send me the debug.log.
>>>>
>>>> Or you could run it in gdb and step through ThreadIRCSeed
>>>> gdb --args bitcoin [switches]
>>>> b ThreadIRCSeed
>>>> run
>>>> step
>>>> or u to step over and up out of routines.
>>>>
>>>> [email protected] wrote:
>>>>> I get the error regardless of the getinfo. Commenting out
>>>>> ThreadIRCSeed fixed the problem.
>>>>>
>>>>>> Does it still do it if you didn't do getinfo?
>>>>>>
>>>>>> You could comment out the CreateThreads listed below, then re-enable
>>>>>> them one at a time until it does it again. Then we would know which
>>>>>> thread the problem is in.
>>>>>>
>>>>>> net.cpp, under // Start threads
>>>>>> CreateThread(ThreadIRCSeed, NULL)
>>>>>> CreateThread(ThreadSocketHandler, NULL, true)
>>>>>> CreateThread(ThreadOpenConnections, NULL)
>>>>>> CreateThread(ThreadMessageHandler, NULL)
>>>>>>
>>>>>> init.cpp:
>>>>>> CreateThread(ThreadRPCServer, NULL);
>>>>>>
>>>>>> [email protected] wrote:
>>>>>>> Here goes. I forgot to mention the crash error message:
>>>>>>>
>>>>>>> terminate called after throwing an instance of 'std::bad_alloc'
>>>>>>> what(): std::bad_alloc
>>>>>>>
>>>>>>>> Could you send me the debug.log?
>>>>>>>>
>>>>>>>> [email protected] wrote:
>>>>>>>>> I tried debugging my build of bitcoind with ddd debugger, but
>>>>>>>>> didn't have much success yet. It always ends up taking all
>>>>>>>>> the system's memory and finally crashes. Could you please
>>>>>>>>> send me again the latest 64 bit build of bitcoind, so I can
>>>>>>>>> see if the problem is about my build?
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
>
링크 복사하기X에 공유페이스북에 공유쓰레드에 공유