-
jeffro256
@hyc: I have a strange issue where a call to `mdb_env_open()` works inside `cryptonote::BlockchainLMDB::open()` when I run a program (`xmrblocks`) regularly. It also works fine with I run that program inside a debugger (`gdb`), but it fails when I run that program in `valgrind`. When running with `valgrind`, `mdb_env_open()` returns EINVAL.
-
jeffro256
I'm having trouble debugging since I can't reproduce it when I run with a debugger. Do you have any idea what could be going on?
-
xmr-pr
tobtoht opened pull request #9801: guix: add rust
-
xmr-pr
-
selsta
.merge+ 9403 9428
-
xmr-pr
Added
-
sech1
I have trouble building the release branch in MSYS2, I get linking errors:
paste.debian.net/hidden/ac3578ef
-
sech1
If anyone can recognize them, maybe you know how to fix it quicklyy
-
sech1
Some conflict between libunwind.a and libgcc_eh.a
-
selsta
sech1: is this with updating all msys2 packages?
-
selsta
-
sech1
Yes, I did "pacman -Syuu" several times before building
-
sech1
Manually disabling libunwind in CMakeLists.txt fixed the issue, but now I won't get callstacks if something happens
-
selsta
it's possible we don't have libunwind installed with CI builds
-
selsta
.merge+ 9439 9438
-
xmr-pr
Added
-
sech1
yeah, my MSYS2 installation is several years old and I've installed and built a lot of different stuff there
-
sech1
wtf, the binary I build just nuked my blockchain and started downloading it from 0
-
sech1
*built
-
sech1
stopped it, started again and it started from 0 again (nuking the previous data.mdb)
-
selsta
i don't think we have any code that can delete the data.mdb
-
selsta
i've done testing on linux and macOS and did not see such a behaviour, but I don't have a windows system to confirm
-
sech1
I can reproduce it consistently, it just refuses to load data.mdb that is there and starts from 0
-
sech1
log level 3 didn't clear up things for me
-
sech1
I think my binary build is broken somehow, I'll revert to v0.18.3.4 for now
-
sech1
I'll build the gitian build later to see if it has the same issue
-
m-relay
<ofrnxmr:xmr.mx> 👀
-
m-relay
<jeffro256:monero.social> sech1: what does running `mdb_stat -rr <MONERO DATA DIR>/lmdb` return ?
-
sech1
Where do I get mdb_stat?
-
m-relay
<jeffro256:monero.social> You can build mdb_stat from the external/db_drivers/liblmdb Makefile
-
sech1
I reverted back to v0.18.3.4 and it's syncing again now. It was a perfectly fine lmdb file before I started all this (I was stopping/starting v0.18.3.4 monerod many times)
-
sech1
So when it nuked the blockchain first time, it wasn't corrupt 100%
-
sech1
I'm building gitian build of the latest release-v0.18 branch, I'll try it when it finishes
-
m-relay
<jeffro256:monero.social> Someone else was posting that running the latest release-v0.18 caused crashes from stale readers
-
m-relay
<jeffro256:monero.social> That's what I've been attempting to debug for the last 2 days
-
m-relay
<jeffro256:monero.social> I think it's related to the xmrblocks block explorer, but I'm not quite sure ... At any rate, it appears to work with v0.18.3.4, but not with latest release-v0.18
-
m-relay
<ofrnxmr:xmr.mx> Jeffro, windows the issue youre looking at too?
-
m-relay
<ofrnxmr:xmr.mx> If using release branch with xmrblocks (onion explorer) it doesnt work
-
m-relay
<jeffro256:monero.social> Nope on Linux
-
m-relay
<jeffro256:monero.social> How doesn't it work in your case?
-
sech1
jeffro256 you could try to reproduce it - just build in a Windows VM using MSYS2 and the official MSYS2 build instructions. You might get a coupe of compiler and linker errors, but they're easy to fix - ask me if you get them.
-
m-relay
<ofrnxmr:xmr.mx> onion explorer devel branch pairs withonero master
-
m-relay
<ofrnxmr:xmr.mx> Their master branch pairs with monero latest release tag
-
m-relay
<ofrnxmr:xmr.mx> Their devel branch already has c++17
moneroexamples/onion-monero-blockchain-explorer #325
-
m-relay
-
m-relay
<ofrnxmr:xmr.mx> Building onion master against monero release-v0.18 requires this pr
moneroexamples/onion-monero-blockchain-explorer #320
-
selsta
sech1:
github.com/monero-project/monero/actions/runs/13374316072 this has a windows build artifact for release-v0.18
-
sech1
selsta yeap, same behavior. It nuked blockchain again and started from 0
-
sech1
at least it's 100% reproducible, should be easy to debug
-
sech1
and it's unstable, crashes during sync
-
selsta
will go through all commits merged since the last release and check if anything touches the database
-
xmr-pr
tobtoht opened pull request #9802: common: add missing iomanip include
-
xmr-pr
-
m-relay
<jeffro256:monero.social> PRs
monero-project/monero #9689 and
monero-project/monero #9622 touch the cryptonote_core/blockchain.cpp since v0.18.3.4
-
sech1
I thought at first that this bug happened because of my setup (monerod as a Windows service), but no. Running straight from command line without parameters results in the same. Blockchain nuked and it starts from 0
-
sech1
and then even crashes during sync
-
m-relay
<jeffro256:monero.social> Is there a crash message?
-
selsta
.merge+ 9802 9803
-
xmr-pr
Added
-
sech1
No, it just exits
-
sech1
with no message
-
m-relay
<jeffro256:monero.social> PRs
monero-project/monero #9705 and
monero-project/monero #9702 touch cryptonote_db/ folder since v0.18.3.4
-
sech1
log level 2 doesn't show anything interesting
-
m-relay
<jeffro256:monero.social> Both of the latter are Windows related
-
sech1
I didn't see messages from 9702
-
sech1
9705 looks sus
-
sech1
boost::filesystem::file_size might not work at all
-
m-relay
<jeffro256:monero.social> Should be commit 6392361d62d47b74977e1b4f31a6db48a706f083 on the release-v0.18 branch
-
sech1
but that commit doesn't explain why it crashes during sync
-
texxy
hi guys
-
m-relay
<jeffro256:monero.social> Oh sorry I see what you're saying. I thought you meant that you didn't see evidence of that PR being in the branch
-
texxy
i am new to crypto
-
texxy
how does xmr prevent replay attacks
-
sech1
So the latest release-v0.18 can't sync on Windows (crash) and can't load the existing database (overwriting it in the process)
-
texxy
my bad i am in #monero now
-
tobtoht_
sech1: reproducible with gitian?
-
sech1
gitian still building and will take several hours because I nuked gitian files before to free space
-
m-relay
<0xfffc:monero.social> Give me a little bit of time ( 2 h) . I will compile it on windows and debug it.
-
m-relay
<0xfffc:monero.social> Possible?
-
m-relay
-
m-relay
<ofrnxmr:xmr.mx> Backup your blockchain first
-
selsta
tobtoht_: it's reproducible with depends builds so likely also gitian
-
tobtoht_
yep can reproduce with depends
-
selsta
it should be easy to git bisect the issue
-
m-relay
<ofrnxmr:xmr.mx> If you have a windows box 🥸
-
m-relay
<jeffro256:monero.social> sech1: is is reproducible with `--offline`?
-
sech1
But it doesn't sync with --offline? If you're talking about blockchain nuking, then probably yes because it happens very early during startup
-
sech1
I can't test now, syncing again with v0.18.3.4. I need to restore my node.
-
tobtoht_
my bisect came up with this:
monero-project/monero #9702
-
tobtoht_
will revert locally to double-check
-
m-relay
<jeffro256:monero.social> Perhaps the `CreateFileW` call?
-
m-relay
<jeffro256:monero.social> I think I found it
-
m-relay
<jeffro256:monero.social> Will PR in a couple minuts
-
selsta
jeffro256: if you touch that code can you also fix the `compressend` typo?
-
m-relay
<jeffro256:monero.social> Of course
-
sech1
boost::filesystem::ofstream(datafile).close(); // touch the file to ensure it exists
-
sech1
lol
-
sech1
"touch" by rewriting it
-
sech1
yeah, that explains why it gets nuked
-
sech1
but it doesn't explain random crashes during sync
-
m-relay
<ofrnxmr:xmr.mx> Maybe it doesnt like to be touched .. ptsd
-
m-relay
<jeffro256:monero.social> Yup
-
m-relay
<jeffro256:monero.social> `boost::filesystem::ofstream` always truncates by default
-
sech1
I think that line is not needed at all
-
sech1
"data.mdb" will be created elsewhere when it's needed
-
jeffro256
-
jeffro256
It will eventually, but I think this is the right spot to create it if it doesn't already exist because we otherwise we would skip the NTFS compression check if it's a first-time setup
-
jeffro256
It would eventually be caught on a second run, but it might cause failures that first run
-
xmr-pr
jeffro256 opened pull request #9804: BlockchainLMDB: fix data.mdb nuking on Windows
-
xmr-pr
-
sech1
yeah
-
tobtoht_
jeffro256: also against release
-
m-relay
<woodser:monero.social> I do see some difference in behavior with the current release-v0.18 branch, where published transactions are not being immediately mined? this is on my local testnet. don't know if there were any changes related to dandelion, etc which could affect behavior of being mined on a local network?
-
m-relay
<ofrnxmr:xmr.mx> wdym by not immediately mined? What miner are you using?
-
xmr-pr
jeffro256 opened pull request #9805: BlockchainLMDB: fix data.mdb nuking on Windows [RELEASE]
-
xmr-pr
-
m-relay
<ofrnxmr:xmr.mx> if youre using monerod to mine, and the tx is in the txpool of the monerod that mined the block, that that would be an issue.
-
m-relay
<ofrnxmr:xmr.mx> if youre using xmrig, then there is a 15 second job timeout by default
-
m-relay
<woodser:monero.social> just using monerod to mine, and yeah, the tx isn't being confirmed when blocks are mined
-
m-relay
<ofrnxmr:xmr.mx> Reproducibly?
-
selsta
.merge+ 9804 9805
-
xmr-pr
Added
-
m-relay
<woodser:monero.social> reproducibly in haveno tests when the payout is made, yes
-
m-relay
<woodser:monero.social> I saw it a few days ago, switched back to earlier binaries and had no problems. just tried the latest release-v0.18 branch and same issue with the payout tx not being mined in the expected blocks
-
selsta
woodser: can you test if you can reproduce the issue with 9460 reverted?
-
m-relay
<woodser:monero.social> yes
-
m-relay
<woodser:monero.social> there are merge conflicts reverting that commit from the release-v0.18 branch which I'm not sure how to resolve, if anyone can point me to a commit to test?
-
ofrnxmr
You can checkout 1 commit before it and test :P
-
m-relay
<woodser:monero.social> sure
-
m-relay
<ofrnxmr:xmr.mx> e488bc838a73f238fb31084dad344350c005654e
-
selsta
9460 caused sporadic issues with the p2p functional test but we thought it was related to the test itself being buggy
monero-project/monero #9755
-
selsta
so it is my best guess for the issue you are seeing woodser
-
m-relay
<woodser:monero.social> e488bc is working fine in my tests
-
selsta
how easy is it to run the haveno tests?
-
m-relay
<ofrnxmr:xmr.mx> woodser
-
m-relay
<preland:monero.social> From my experience, it is anywhere from very easy to very difficult
-
m-relay
<preland:monero.social> The only way to find out which one it’ll be is to try lol
-
m-relay
<syntheticbird:monero.social> Elected most insightful insight of 2025 🏆️
-
m-relay
<preland:monero.social> 😂
-
m-relay
<preland:monero.social> Actually I’m just going to say that it’s incredibly difficult and it will be a challenge
-
m-relay
<preland:monero.social> That way when they try it, it’ll logically work perfectly with no issues
-
selsta
woodser: can you also test commit 00e582a2b1bc6872dd8bddb31bd95bab79185ce6 to make sure it is 9460?
-
m-relay
<woodser:monero.social> yep testing
-
sech1
I'm testing
monero-project/monero 0232839 (the latest from release-v0.18 branch). It doesn't delete the DB anymore, but it still crashes when syncing (and quickly).
-
m-relay
<ofrnxmr:xmr.mx> No log for the crash?
-
sech1
No
-
sech1
Exception thrown at 0x0000000000DA3930 in monerod.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
-
sech1
That's all I have
-
sech1
mov rdx,qword ptr [rax]
-
sech1
rax is 0
-
sech1
I'll try to build and run under gdb, but it never worked for me on Windows
-
sech1
huh, gdb is working now. But it doesn't crash :D
-
sech1
yeah, ci/gh-actions/depends / Win64 binary crashes, self-built doesn't crash
-
sech1
It's probably again the same story that will only be fixed with guix builds
-
m-relay
<woodser:monero.social> selsta 00e582a2b1bc6872dd8bddb31bd95bab79185ce6 is broken for me and shows these messages in monerod log repeatedly:
-
m-relay
<woodser:monero.social> 2025-02-17 20:29:39.870 W Unable to send transaction(s), no available connections
-
m-relay
<woodser:monero.social> 2025-02-17 20:29:39.925 E Unable to send transaction(s) via Dandelion++ stem
-
m-relay
<woodser:monero.social> it's pretty easy to run the tests if more are needed
-
m-relay
<ofrnxmr:xmr.mx> The second error should happen if you have no incoming connections, the first if you have no outgoing
-
m-relay
<ofrnxmr:xmr.mx> do you have connections while this prints?
-
m-relay
<woodser:monero.social> 2 nodes connected to each other
-
m-relay
<woodser:monero.social> maybe its causing some connection issue there?
-
selsta
woodser: does your test increase --max-connections-per-ip ?
-
selsta
tobtoht_: can you reproduce what sech1 is seeing?
-
m-relay
<woodser:monero.social> nope not that I know of
-
selsta
can you try if that fixes it?
-
sech1
I remember that we had random crashes when solo mining with more than 1 thread, and it was only fixed with guix builds. It's probably the same compiler issue.
-
m-relay
<woodser:monero.social> only mining with one thread though
-
sech1
-
sech1
-
sech1
But it's a bigger problem now - the official binary couldn't mine on Windows before, now it can't sync
-
selsta
woodser: please try with `--max-connections-per-ip 10`
-
selsta
sech1: yes this is not something we can release hmmm
-
selsta
at what point does it crash during sync? only at the randomx party or earlier?
-
selsta
part*
-
sech1
No, it crashes when syncing the first few hundred blocks (Cryptonight territory)
-
sech1
so basically I start syncing from 0, wait a few seconds (max half a minute), and it crashes
-
tobtoht_
selsta: I had the depends build from the fix running for a while and didn't run into any issues.
-
m-relay
<woodser:monero.social> selsa starting the nodes with `--max-connections-per-ip 10000` does indeed fix the problem
-
m-relay
<woodser:monero.social> and I confirmed the issue appears with PR 9460 (commit 0cd74568d6a7709c82cb12012ec952c8d00d6c96)
-
m-relay
<woodser:monero.social> selsta starting the nodes with `--max-connections-per-ip 10000` does indeed fix the problem
-
m-relay
<ofrnxmr:xmr.mx> The default setting for max-connections-per-ip is 1
-
sech1
tobtoht_ which Windows version?
-
tobtoht_
windows 10 22h2
-
m-relay
<syntheticbird:monero.social> I'm disappointed in seeing github dropping the Windows XP service pack 1 CI
-
sech1
-
sech1
also windows 10 22h2
-
sech1
nope, it crashed
-
sech1
after I deleted p2pstate.bin and tried to sync again, it crashed immediately. One more attempt, and it synced 20k blocks and then crashed
-
sech1
maybe it depends on who you connect to and how fast their connection is
-
sech1
3rd attempt, crashed after 12k blocks
-
sech1
self-built binary doesn't crash, I tried 2 times so far.
-
m-relay
<woodser:monero.social> `--max-connections-per-ip 10` works too
-
sech1
what's the gcc version in ci/gh-actions/depends/Win64 builds?
-
sech1
9.3.0
-
sech1
self-built binary was built with gcc 14.2.0
-
selsta
woodser: can it happen in your test that there is more than 1 incoming connection?
-
m-relay
<ofrnxmr:xmr.mx> It sound like it was incorrectly allowing >1 connection per ip before
-
tobtoht_
I deleted p2pstate a few times and let it sync, but can't repro.
-
m-relay
<woodser:monero.social> there's 2 daemons talking to each other, and several wallets connecting to them. otherwise I wouldn't know. I don't do any specifically to increase incoming connections
-
m-relay
<woodser:monero.social> actually like 30 wallets heh
-
sech1
tobtoht_ how fast does it sync for you in the beginning? For me it's like 1000 blocks/second. Maybe you don't sync fast enough to crash it
-
m-relay
<ofrnxmr:xmr.mx> sech1, 18.3.4 still syncs w/o issue?
-
sech1
yes
-
m-relay
<ofrnxmr:xmr.mx> did you try to totally delete the data-dir (perhaps an issue with the compression switch messed up the folder)
-
sech1
It's not compressed
-
sech1
I deleted it between tests
-
m-relay
-
m-relay
<0xfffc:monero.social> silent crash!
-
m-relay
<0xfffc:monero.social> MSVC support would be useful here. I could've added MSVC native support ( exactly like bitcoin has ) in just a few days.
-
sech1
the problem is, MSVC built binary wouldn't crash
-
sech1
same as my local gcc-14.2.0 built binary doesn't crash
-
sech1
unless you can make MSVC understand debug symbols from GCC
-
sech1
-
selsta
so what is the best way to continue here? bisect with depends builds? check if the PR has undefined behavior?
-
m-relay
<0xfffc:monero.social> VCPKG support for windows is first class. We can use it exactly same as we use depends ( like bitcoin )
github.com/bitcoin/bitcoin/blob/master/vcpkg.json
-
m-relay
<0xfffc:monero.social> bisect should be easier
-
m-relay
<0xfffc:monero.social> specially since we have guix build on master.
monero-project/monero #8929
-
sech1
Bisect is probably the best option
-
sech1
Assuming that it breaks at a specific commit and it's not some flaky compiler bug that happens in half of commits and doesn't happen in another half of commits
-
m-relay
<0xfffc:monero.social> That can be a huge headache. I used to fight with compiler bugs! they get extremely nasty.
-
m-relay
<ofrnxmr:xmr.mx> sech, can you manually bisect using bins from existing actions depends builds
-
selsta
ofrnxmr: they have their bug with blockchain getting nuked
-
sech1
I will try
-
sech1
Not a problem for me, I'll test it with a separate --data-dir
-
selsta
right i guess it does not matter if you try syncing from scratch
-
m-relay
-
sech1
-
sech1
builds before it don't crash
-
m-relay
<syntheticbird:monero.social> Ouch
-
m-relay
<syntheticbird:monero.social> boost strikes again
-
sech1
I'm not sure such big PR even needs to go to a release branch
-
m-relay
<syntheticbird:monero.social> Arch linux maintainer would like to have a word
-
m-relay
<ofrnxmr:xmr.mx> Sech, does master crash too?
-
m-relay
<0xfffc:monero.social> I agree.
-
m-relay
<preland:monero.social> Ah boost 🥰🤡
-
sech1
Too late for me to test master branch today, going to sleep
-
sech1
Testing :D
-
sech1
Latest master seems to work fine
-
sech1
So it's either a compiler bug, or an undefined behavior somewhere in that PR
-
sech1
when compiled by a different compiler, or with significantly different code (master vs release), it behaves differently
-
sech1
yep, latest master doesn't crash - 3/3 so far (50k blocks sync)
-
selsta
master has the same PR
-
sech1
yes, and it doesn't crash
-
sech1
so it can be explained by an undefined behavior giving different results
-
sech1
or a compiler bug that depends on surrounding code which is different
-
sech1
Shame that -fsanittize=undefined doesn't build in MSYS2 (no support from compiler)
-
m-relay
<tobtoht:monero.social> master has boost 1.84, release 1.66. could be a boost bug