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

Test if AnaphoraTest passes when not using Pymalloc #3585

Open
ferrouswheel opened this issue Jul 16, 2019 · 10 comments
Open

Test if AnaphoraTest passes when not using Pymalloc #3585

ferrouswheel opened this issue Jul 16, 2019 · 10 comments
Labels

Comments

@ferrouswheel
Copy link
Contributor

Discovered that building with Python3 will use libpython3m.so by default: opencog/atomspace#2270 - one thing to test is whether swapping to normal malloc (i.e. linking against libpython3.so) has any impact on the AnaphoraTest failure "too many root sets" mentioned in #3529 - the Boehm GC may not like whatever Python is doing to maintain it's own memory management.

@TheScott463
Copy link

TheScott463 commented Jul 16, 2019 via email

@ferrouswheel
Copy link
Contributor Author

Looks like an interesting read.

(I edited your comment to remove the spam)

@linas
Copy link
Member

linas commented Jul 16, 2019

BoehmGC is "conservative" it knows which memory it is supposed to be managing, and which belongs to someone else. It knows which is which because it knows who called malloc. Maybe the failure might be due to fragmentation: maybe it tries to keep each chunk of RAM that it is supposed to be managing in it's own "root set" and by interleaving too many guile mallocs with other mallocs might overflow something. Although this does not quite make sense, because the C++ code is going hog-wild making tiny mallocs, which should cause tremendous fragmentation, and that is not causing any problems...

@TheScott463
Copy link

TheScott463 commented Jul 16, 2019 via email

@TheScott463
Copy link

TheScott463 commented Jul 16, 2019 via email

@linas
Copy link
Member

linas commented Jul 16, 2019

@TheScott463 when you reply with your verizon phone, verizon attaches a large quantity of junk to your messages, and that junk gets recorded into github. making it hard-to-read. That's the "spam" that Joel refers to. (take a look at the web page).

@linas
Copy link
Member

linas commented Jul 16, 2019

@TheScott463 the "too many root sets" error message is printed by BoehmGC and not by glibc nor by python. This issue is not debugging malloc, but understanding why "too many root sets" is being printed.

@TheScott463
Copy link

"BoehmGC is "conservative" "

But python is "aggressive" with malloc and stacks and it "overflows" intentionally at times. Perhaps, python is chewing through "root sets" on accident.

Then again, I'm guessing and probably don't get the real problem yet.

@linas
Copy link
Member

linas commented Jul 16, 2019

Hmm. Well, writing to memory that doesn't belong to you is famously called a "zero day exploit" and is rewarded with a news headline; so its not quite that.

We intermix python and scheme quite a lot; most of the chatbot is in scheme; the robot interfaces are in ROS which is python. It's hard to imagine that AnaphoraUTest manages to mix these two together even more than other parts, but ... well its a guessing game, and its not a component we actively use right now, so the incentive to debug is minor.

@linas
Copy link
Member

linas commented Jul 17, 2019

BTW, AnaphoraUTest passes for me, without any issues. I'm running Python 3.5.3 and guile (GNU Guile) 2.9.2
and Boehm GC with the "huge" memory model. My latest guess is that this the failure stems from not using the "huge" memory model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants