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

[BUG] Debian 12 - Memory Protection Violation when using value from list #3205

Closed
Karolcha100 opened this issue Jul 9, 2024 · 2 comments
Closed
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@Karolcha100
Copy link

Bug description

When program is started, its breaks in v2_BACKEND.mojo in somewhere in line 392. As far as i understand, i think that it is due to something wrong with "possible_connections" list, in 'calculate_random_connections_create' method, in 'Graph' structure.

I tried to copy that list, and do other stuff, but program always breaks when im trying to get elements from that list (note that, it is breaking after second use). When i ran program with random.seed(time.now()), the breaking point was also diffrent, but always connected to that list.

Here is an output when i run the main.mojo

Round: 1 Akts: 2 Conects: 1 Mean energy: 52.0 Time: 0.0
Round: 2 Akts: 4 Conects: 3 Mean energy: 48.022743225097656 Time: 0.0
y= 2
x= 3
w= 3
Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all > the relevant source codes.
Stack dump:
0. Program arguments: mojo main.mojo
#0 0x0000555fee12e438 (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1438)
#1 0x0000555fee12c25e (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x129f25e)
#2 0x0000555fee12eacd (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x12a1acd)
#3 0x00007f355a85b050 (/lib/x86_64-linux-gnu/libc.so.6+0x3c050)
#4 0x0000555fef8cc54c (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x2a3f54c)
#5 0x0000555fef8dc27a (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x2a4f27a)
#6 0x0000555fef8dc45e (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x2a4f45e)
#7 0x0000555fef8db4da (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x2a4e4da)
#8 0x0000555fef8db2d1 (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x2a4e2d1)
#9 0x0000555ff0518d0e (/home/karol/.modular/pkg/packages.modular.com_mojo/bin/mojo+0x368bd0e)
#10 0x00007f354b63cf28 KGEN_CompilerRT_AlignedFree (/home/karol/.modular/pkg/packages.modular.com_mojo/lib/libKGENCompilerRTShared.so.19.0git+0x3cf28)
#11 0x00007f35040177e4
mojo crashed!
Please file a bug report.
Naruszenie ochrony pamięci

where "Naruszenie ochrony pamięci" means "Memory protection violation".

below i attached .txt versions of main.mojo and v2_BACKEND.mojo.
main.txt
v2_BACKEND.txt

Steps to reproduce

Run main.mojo which imports Graph Struct from v2_BACKEND.mojo
It will write some variable values and you will get error.

As i said, in my opinion it is mostly about 'possible_connections' list in 'calculate_random_connections_create' method.

System information

- What OS did you do install Mojo on ? - Debian 12 Bookworm
- Provide version information for Mojo by pasting the output of `mojo -v` - mojo 24.4.0 (2cb57382)
- Provide Modular CLI version by pasting the output of `modular -v` - modular 0.8.0 (39a426b5)
@Karolcha100 Karolcha100 added bug Something isn't working mojo-repo Tag all issues with this label labels Jul 9, 2024
Copy link
Collaborator

Thanks for filing. Would you be able to provide a reduced testcase to help narrow this down?

@JoeLoser JoeLoser closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Copy link
Collaborator

JoeLoser commented Oct 7, 2024

Closing the issue due to inactivity. Please re-open with source code for the repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

3 participants