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

Memory errors, segfaults and thread safety #184

Open
layters opened this issue Aug 7, 2023 · 0 comments
Open

Memory errors, segfaults and thread safety #184

layters opened this issue Aug 7, 2023 · 0 comments
Labels
⬆️ high priority High priority issues good first issue Good for newcomers 🐞 bug Something isn't working 💰 bounty Get paid by completing a task

Comments

@layters
Copy link
Owner

layters commented Aug 7, 2023

Details

Segmentation faults occur sometimes

  • when a node receives a map query request and Node::map() is called.
  • when a node adds a node to the routing table on ping via Node::on_ping()

These segfaults tend to occur when the network grows to a large size like about 20+ nodes.

I generally suck at memory management and handling pointers so any help would be greatly appreciated!
And if its not a memory management issue then this may have to do with accessing the node from multiple threads simultaneously.

Segment faults upon closing GUI application - Details

This segfault happens when closing the GUI while logged in, but it never occurs while not logged in yet and you are still at the main login page.

This may have to do with the code in a destructor in one of the classes. wallet.cpp is a suspect.

Sometimes the error is not a Segfault but similar:

double free or corruption (fasttop)
Aborted (core dumped)

Files and references

https://github.com/larteyoh/testshop/blob/main/src/core/protocol/p2p/node.cpp
https://github.com/larteyoh/testshop/blob/main/src/core/protocol/p2p/mapper.cpp

Bounty reward

$20

@layters layters added 🐞 bug Something isn't working good first issue Good for newcomers 💰 bounty Get paid by completing a task ⬆️ high priority High priority issues urgent Required to move forward labels Aug 7, 2023
@layters layters changed the title Segfaults everywhere Memory errors and segfaults Oct 29, 2023
@layters layters removed the urgent Required to move forward label Oct 29, 2023
@layters layters changed the title Memory errors and segfaults Memory errors, segfaults and thread safety Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⬆️ high priority High priority issues good first issue Good for newcomers 🐞 bug Something isn't working 💰 bounty Get paid by completing a task
Projects
None yet
Development

No branches or pull requests

1 participant