Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-10-28 00:00:00Z and 2021-10-29 00:00:00Z
03:46
china is planning on requiring platforms to show ip geolocation alongside with usernames.
03:46
monkaS
Avatar
Avatar
Jupstar ✪
(ok in this case its the prediction code, but i think its pretty similar to the server code) cant remember if that was fixed in the server code or even happened
I noticed a weird crash too in prediction code, i made a design changer and when the new map gets loaded there seems to be a crash sometimes, some index too high for the m_pTiley array from collision, idk why
Avatar
Avatar
Jupstar ✪
was antibot updated?
yes
Avatar
b42c06b M Multeasymap, A Luna - ddnet-maps
Avatar
is it bad to revert a pull request that has already been merged? (edited)
Avatar
I think the best option is to make a PR that reverts that PR.
04:43
If you do that then the github PR might catch that it's been reverted & re-open, but I haven't ever tried (edited)
Avatar
yes, I mean this button creates the new PR but I don't know if it'll fuck up something xd
Avatar
it won't fuck anything up, it creates a PR with the git revert commit. DDNet maintainers can deny your PR. But you probably want to make an issue if you haven't yet explaining why you are reverting the pr (edited)
04:48
The git history will still be in-tact, so you don't have to worry about fucking up someone else's history like you would with rebase. The revert would be put at HEAD and anyone rebasing/merging would have to deal with that revert
Avatar
it's just a .txt tho
Avatar
doesn't really matter what kind of file it is, even binary, all git does is maintain a history of diffs.
04:49
if you created a .txt file then the revert would just remove it
Avatar
so if I edited the .txt and then revert it, it'll go back to how it was before?
Avatar
yeah hold on i can just demonstrate this
04:54
[I] /home/toad/repo/test > git log commit 5722bd316a408006fe39042c14b131d0e42da4f3 (HEAD -> master) Author: aodq <0@aodq.net> Date: Wed Oct 27 17:53:08 2021 -0700 Revert "changes bob to joe" This reverts commit d78d20190b2edfa25909a8f91f7a0a83ab7ed047. commit d78d20190b2edfa25909a8f91f7a0a83ab7ed047 Author: aodq <0@aodq.net> Date: Wed Oct 27 17:52:56 2021 -0700 changes bob to joe commit e0397f9787a068274c03b629c4d2ca461cf54e81 Author: aodq <0@aodq.net> Date: Wed Oct 27 17:52:37 2021 -0700 adds initial test [I] /home/toad/repo/test > git diff HEAD~ diff --git a/test.txt b/test.txt index 0870381..724b0fd 100644 --- a/test.txt +++ b/test.txt @@ -1 +1 @@ -hello there, my name is Joe. +hello there, my name is Bob. [I] /home/toad/repo/test > git diff HEAD~2
04:55
the last git diff HEAD~2 doesn't print anything because there is no difference from the initial and last commit, bc the second commit was reverted
Avatar
ah, ok
05:01
so it's better to make a new pr of the merged one
05:01
for what i want to do
Avatar
Yeah I think that revert button will do what you want
05:02
if not, like if you wanted to extra work on top, you could just revert it from git commandline then make whatever other commits you need before you do a PR
05:03
git revert <commit-id>
Avatar
ty very much
👍 1
Avatar
-Lines 563, 944, 1175, 1178 & 1181: Removed tildes from "Volumen" (thanks to Lagar85). -Line 1091: "APM" meaning is "Asesinatos Por Minuto" (Frags Per Minute) -More little grammar/syntax changes.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out...
Avatar
chillerdragon BOT 2021-10-28 09:28:44Z
If ubsan throws a error it is the line the error was first catched right? So not neccessarly the line the issue was caused in hm? I currently get "runtime error: -nan is outside the range of representable values of type 'int'"
Avatar
e1f131b Allow zooming any distance in editor - def- de86188 Merge #4257 - bors[bot]
Avatar
85b0dcd Fix data race in backend_sdl - Jupeyy 06a155a Merge #4258 - bors[bot]
Avatar
fixes #4259 Didn't find any further issues for now, maybe with other configs or faster/slower processor more are detected

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps...
Avatar
chillerdragon BOT 2021-10-28 12:29:56Z
Any ideas on how to avoid conflicting defintions of keys.h and ncurses without editing keys.h? I try to include ncurses in ddnet and it yells at me that for example KEY_BACKSPACE is defined already. Any chance we can rename all key constants in ddnet?
Avatar
don't include both from the same cpp file?
Avatar
chillerdragon BOT 2021-10-28 12:46:00Z
hmm i mean sooner or later both are included
Avatar
make the KEY_* enum an enum class KEY
12:46
then they are different
Avatar
chillerdragon BOT 2021-10-28 12:46:29Z
?
Avatar
enum class is better anyway
Avatar
chillerdragon BOT 2021-10-28 12:46:35Z
whats that
12:46
so you mean editing the keys.h?
12:47
well, editing the datasrc file that generates keys.h
Avatar
chillerdragon BOT 2021-10-28 12:47:15Z
ye ofc
Avatar
and then in the source code use KEY::FIRST instead of KEY_FIRST
Avatar
chillerdragon BOT 2021-10-28 12:47:23Z
but then i diff with upstream
12:47
can we get that in ddnet?
Avatar
I'd be ok with it, maybe wait for some other opinions
12:47
another alternative would be namespaces
Avatar
chillerdragon BOT 2021-10-28 12:48:01Z
would also fix the windows conflict
12:48
i did rename all keys from KEY_BACKSPACE to TW_KEY_BACKSPACE once
12:48
thats maybe less typing
12:49
namespaces might be the coolest so in binds.cpp and so on we can do using namespace
12:51
8631930 Put buffer under the mutex - Jupeyy 141ce9e Protect various variables for the sound class - Jupeyy 5da25cd Make some variables atomic, that are read from the main thread - Jupeyy 6efd65d Merge #4261 - bors[bot]
Avatar
chillerdragon BOT 2021-10-28 12:59:09Z
image.png
12:59
meh thats a bit ugly i can not do 1 = 30
Avatar
Jupstar ✪ BOT 2021-10-28 13:03:09Z
1 = 30 🤪
Avatar
chillerdragon BOT 2021-10-28 13:03:18Z
:D
Avatar
chillerdragon BOT 2021-10-28 13:21:01Z
image.png
13:21
front end is hard
Avatar
Fixes the windows conflict. And allows to include ncurses without headache.

Checklist

  • [x] Tested the change ingame
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#usi...
Avatar
Jupstar ✪ BOT 2021-10-28 13:25:53Z
image.png
13:26
guess u didnt rebase or smth?
Avatar
chilledragon maybe try KB_1 KB_2 instead
Avatar
chillerdragon BOT 2021-10-28 13:30:56Z
yaya i saw and fixed it
image.png
13:31
KB as in KEYBOARD?
13:31
i think it makes sense
Avatar
chillerdragon BOT 2021-10-28 13:31:24Z
would also be inconsistent then
Avatar
there is already KP as in keypad
13:31
its consistent
Avatar
chillerdragon BOT 2021-10-28 13:31:42Z
KEY::A does not have a KB prefix
Avatar
_1 looks horrendous
Avatar
chillerdragon BOT 2021-10-28 13:31:47Z
it does
Avatar
Jupstar ✪ BOT 2021-10-28 13:32:03Z
ONE_1, then you can find it by name and by number :D
Avatar
chillerdragon BOT 2021-10-28 13:32:10Z
or just ONE ?
13:32
THREE_3
13:32
lmao
Avatar
chillerdragon BOT 2021-10-28 13:32:23Z
KEY::ONE
13:32
KAY ONE
13:32
aaxaxaxaxax
Avatar
ur german not russian
Avatar
Jupstar ✪ BOT 2021-10-28 13:32:45Z
TEEWORLDS_KEYBOARD_KEY_WITH_NUMBER_ONE_OR_NUMERICAL_1
Avatar
stop culture apropiation
13:32
laugh like a deutsch
Avatar
chillerdragon BOT 2021-10-28 13:32:59Z
:D
13:33
i am rus
Avatar
HöhöHöhöHöhöHöhöHöhö
13:33
this
Avatar
chillerdragon BOT 2021-10-28 13:33:22Z
lol
13:33
I honestly like KEY::ONE
13:33
any opinions?
Avatar
Jupstar ✪ BOT 2021-10-28 13:33:53Z
just use SDL keycodes xD
Avatar
looking at those tsan prs
13:34
reminds me of rust
Avatar
chillerdragon BOT 2021-10-28 13:34:10Z
so remove keys.h u mean?
Avatar
and the fact it wouldnt have ever happened
13:34
greenthing
Avatar
Jupstar ✪ BOT 2021-10-28 13:34:20Z
i guess that wouldnt hurt
Avatar
chillerdragon BOT 2021-10-28 13:34:31Z
adventerous
Avatar
Jupstar ✪ BOT 2021-10-28 13:34:36Z
its always a trade @Ryozuki
13:34
therefore less control over it
Avatar
Jupstar ✪ BOT 2021-10-28 13:35:05Z
atleast if you want to stay in safe rust ofc
Avatar
there is no trade here
13:35
rust is safe outright
Avatar
Jupstar ✪ BOT 2021-10-28 13:35:37Z
but what happens under the hood? locking, memory barrier?
Avatar
in rust u still use mutex condvars arcs etc
13:36
its just that u cant miss them
13:36
due to how Send + Sync trait works
13:36
u should learn rust to know what i mean
Avatar
I suggest you don't get into this with ryozuki, he will shoot you
13:39
did we find out why that crash happens?
Avatar
I'm still looking at the coredump blankly
13:40
the state the gameserver ended up in makes absolutely no sense to me
Avatar
sucks its delaying the release
13:40
feelsbadman
Avatar
Jupstar ✪ BOT 2021-10-28 13:40:35Z
i see, but then it probs catches too much in some cases? what would happen if one thread reads a var, but writes to it later inside a mutex, and reads from a different thread with the mutex
Avatar
We somehow end up with a zero'd out CCharacter inside the entity linked list
Avatar
chillerdragon BOT 2021-10-28 13:40:56Z
@Ryozuki: when start rewtring parts of ddnet code base in rust?
Avatar
probs never
Avatar
chillerdragon BOT 2021-10-28 13:41:20Z
why not
Avatar
rewriting is too much effort
Avatar
chillerdragon BOT 2021-10-28 13:42:18Z
even only parts?
Avatar
that would lose the point of using rust
13:42
since u will have c code
Avatar
Jupstar ✪ BOT 2021-10-28 13:42:39Z
if rust gets new syntax xD
13:42
bcs that still sucks
13:42
i like rust syntax
Avatar
chillerdragon BOT 2021-10-28 13:42:58Z
no syntax is worse than modern c++
Avatar
ye i dislike modern c++
Avatar
Jupstar ✪ BOT 2021-10-28 13:43:13Z
modern c++ is fine to me
Avatar
its cuz they cant make it first class features
13:43
so they make some weird stuff
Avatar
Jupstar ✪ BOT 2021-10-28 13:43:19Z
u just have to understand templates
Avatar
Jupstar: A regular variable wouldn't be Send or Sync, so can't really happen iirc
Avatar
Avatar
Jupstar ✪
u just have to understand templates
magick
Avatar
Jupstar ✪ BOT 2021-10-28 13:43:42Z
but how is it protected then? (@Learath2)
Jupstar: A regular variable wouldn&#x27;t be Send or Sync, so can&#x27;t really happen iirc
13:43
over the borrow system?
Avatar
chillerdragon BOT 2021-10-28 13:44:09Z
std::thread([after, task]() { std::this_thread::sleep_for(std::chrono::milliseconds(after)); task(); }).detach();
Avatar
the compiler automatically marks variables with Send and Sync
Avatar
Jupstar ✪ BOT 2021-10-28 13:44:45Z
so is it protected or not xd
Avatar
u cant have data races in rust
13:44
i think its even mathematically proved
Avatar
Jupstar ✪ BOT 2021-10-28 13:45:00Z
see
13:45
and thats why i ask
Avatar
you can still have
13:45
deadlocks tho
Avatar
Jupstar ✪ BOT 2021-10-28 13:45:44Z
so you dont know what happens
13:45
the compiler does it automatically
Avatar
If the compiler thinks it's safe it'll mark things with Send and Sync. You also have wrapping types which themselves are send/sync
13:46
atomic variables for exampel are marked Send
Avatar
Jupstar ✪ BOT 2021-10-28 13:46:31Z
i understand, but lets not use atomics
13:46
i want a variables used in 2 threads like in my example
Avatar
Jupstar ✪ BOT 2021-10-28 13:47:07Z
the write is always protected, and the read from the other thread too
13:48
ok i write the c++ example, you do the same in rust ok? :D
Avatar
ok i try
13:48
xd
Avatar
I have a feeling your example is going to be UB though since what you seem to be describing is a data race
13:50
you have to know, a Mutex alone doesnt allow you to share variables over threads in rust
13:50
you need a Arc too
Avatar
(or I misunderstood, that is also possible)
13:53
he is crafting c++ wizardry
Avatar
Jupstar ✪ BOT 2021-10-28 13:53:52Z
#include <mutex> #include <thread> #include <stdio.h> int ProtectMe = 0; std::mutex m; static void f() { bool breakloop = false; while(breakloop) { m.lock(); printf("test %d", ProtectMe); if(ProtectMe >= 1000) { breakloop = true; } m.unlock(); } } int main() { std::thread t(f); while(ProtectMe < 1000) { m.lock(); ProtectMe++; m.unlock(); } t.join(); }
13:55
ojh
13:55
while (!breakloop)
13:55
Edit: #include <mutex> #include <thread> #include <stdio.h> int ProtectMe = 0; std::mutex m; static void f() { bool breakloop = false; while(!breakloop) { m.lock(); printf("test %d", ProtectMe); if(ProtectMe >= 1000) { breakloop = true; } m.unlock(); } } int main() { std::thread t(f); while(ProtectMe < 1000) { m.lock(); ProtectMe++; m.unlock(); } t.join(); }
13:55
just come to discord
13:55
this bot sucks xd
Avatar
Jupstar ✪ BOT 2021-10-28 13:56:01Z
soon
13:56
soon:tm:
13:56
int ProtectMe = 0; std::mutex m; static void f() { bool breakloop = false; while(!breakloop) { m.lock(); printf("test %d\n", ProtectMe); if(ProtectMe >= 1000) { breakloop = true; } m.unlock(); } } int main() { std::thread t(f); while(ProtectMe < 1000) { m.lock(); ...
Avatar
ok, this doesn't look like a data-race
13:58
Oh actually I think it is
Avatar
Jupstar ✪ BOT 2021-10-28 13:58:25Z
thread2 never writes to it, so should be fine
13:58
all changes are visible to all threads
Avatar
i can do this with a RwLock
Avatar
Jupstar ✪ BOT 2021-10-28 14:00:48Z
if its possible then fine, but ofc no unsafe code :D
14:01
its certainly not impossible for the compiler to see read only stuff, i just wonder if rust does it
14:01
or better: if you know if it does it
14:01
or if it happens under the hood
Avatar
use std::sync::{Arc, RwLock}; fn main() { let protect_me = Arc::new(RwLock::new(0)); let protect_me_thread = Arc::clone(&protect_me); let handle = std::thread::spawn(move || loop { let protect_me_thread = protect_me_thread.read().unwrap(); if *protect_me_thread >= 1000 { println!("reached target"); break; } }); while *protect_me.read().unwrap() < 1000 { println!("adding one"); *protect_me.write().unwrap() += 1; } handle.join().ok(); }
14:02
ez
Avatar
Okay, this is indeed safe and I don't think you can easily get the same assembly in rust
Avatar
Jupstar ✪ BOT 2021-10-28 14:02:54Z
i dunno what exactly a RWLock is, is it read write lock, like a guard?
Avatar
You needed an Arc, that's extra overhead, and you are reading the value under the lock unlike in jupstars example
14:03
RWLock is sort of like a mutex but it allows multiple readers and a single writer
14:05
Your example is only safe because the only write happens on the thread where the "unsafe" read happens btw
Avatar
Jupstar ✪ BOT 2021-10-28 14:05:35Z
i mean to be fair i really like the concept of rust for other reasons @Ryozuki , bcs it basically prooves memory safety, which could be abused to build "less safe" processor designs in regard to the kernel/os, e.g. remove the ringsbut nobody can tell me that the above syntax is soo much better than c++ XDD
14:06
if there wouldnt be some trade, it wouldnt be considered high level ofc
14:07
yeah :D (@Learath2)
Your example is only safe because the only write happens on the thread where the "unsafe" read happens btw
Avatar
To be fair though, I think you'd just use an atomic here, should give you roughly the same performance on x86
Avatar
i like more rust syntax tho
Avatar
Jupstar ✪ BOT 2021-10-28 14:07:57Z
probably yes :D
Avatar
but u will never convince me
14:08
its subjective
Avatar
Jupstar ✪ BOT 2021-10-28 14:08:09Z
yeah its ok
14:08
there are also ppl liking pythons syntax
14:08
so i have to acept thats its subjective anyway xD
Avatar
have you found urself in a situation of the code u sent in a real project?
Avatar
Jupstar ✪ BOT 2021-10-28 14:09:03Z
it happens in ddnet for example :D
Avatar
and ddnet segfaults a lot
14:09
monkalaugh
Avatar
I actually don't see how to get it to work in rust. @heinrich5991 could know, he is more of a rust wizard
Avatar
ye he knows more
14:09
idk
14:09
maybe what jupstar is doing is ub?
Avatar
Jupstar ✪ BOT 2021-10-28 14:09:58Z
but ddnet segfaults bcs of memory overflow or deletes
14:10
i doubt its UB
14:10
its just living at the limits
Avatar
i doubt u get much more realistic perf with that than a Read write lock
Avatar
Jupstar ✪ BOT 2021-10-28 14:11:12Z
non relaxed atomics for example, are pretty powerful, they are almost like a mutex just without threads waiting on it, but the constraits allow you to garantuee visisbility across threads even for non atomics
Avatar
Avatar
Ryozuki
maybe what jupstar is doing is ub?
I don't think so, I took a look at the standard, seems fine since the only possible write that could conflict with the "unsafe" read is sequenced after the said read. No conflicting action = no data race atleast
Avatar
Jupstar ✪ BOT 2021-10-28 14:11:30Z
thats also the reason lock free queues etc exists
14:11
probably not, not with modern hardware atleast (@Ryozuki)
i doubt u get much more realistic perf with that than a Read write lock
14:12
i litterally added a mutex to alot of sound calls, and made no real difference
14:12
(that werent there before)
14:13
i mean most stuff programmed today isnt designed for ultimate performance anyway :D
Avatar
Sometimes I wish there was a way to do extremely unsafe stuff without invoking UB. Like sometimes I really don't care about a data-race
Avatar
Jupstar ✪ BOT 2021-10-28 14:13:43Z
i am still for a rethink of all software, the whole concept of theads suck, we need a design like GPUs do it, eheheheh
Avatar
I'm okay with the reader getting incomplete/broken data
14:13
👀
Avatar
Jupstar ✪ BOT 2021-10-28 14:13:54Z
no write /read in one pipeline call
Avatar
Avatar
Jupstar ✪
i am still for a rethink of all software, the whole concept of theads suck, we need a design like GPUs do it, eheheheh
Like massively parralelized stuff? Not all tasks parallelize that well tho :/
Avatar
Jupstar ✪ BOT 2021-10-28 14:14:28Z
i know
14:14
i just like the idea alot
14:14
thinking about it is very hard
14:14
even trying todo it
14:15
most ppl probs just write singlethreaded stuff, or "semi" threaded stuff
Avatar
I was wondering the feasibility of doing npc AI on a gpu. It's like the perfect task to parallelize
14:17
Could do like thousands of ai agents in a city like that
Avatar
I couldn't justify looking further into it since I worry just ferrying the data between the gpu and the cpu would be too slow for it to be worth until I get many thousands of ai agents
14:19
But with architectures like the M1 where you get compute cores very closely linked to the cpu it might just become feasible to do
Avatar
Jupstar ✪ BOT 2021-10-28 14:20:31Z
yeah, very interesting indeed
Avatar
i dislike m1
14:20
cuz
14:20
its made by apple
Avatar
apple
Avatar
imho it would be real progress is they made it open for everyone
Avatar
Jupstar ✪ BOT 2021-10-28 14:20:58Z
a real strength of m1, i wonder if they can scale it to a desktop component, or if the heat is too much there
Avatar
but i will never consider looking into a m1 or things to do with it
14:21
cuz its locked into apple
Avatar
Jupstar ✪ BOT 2021-10-28 14:21:21Z
yeah ofc, i wouldnt buy it with macos xD, thats like a big downgrade
Avatar
Did you see alder lake? Seems atleast we are getting big-core little-core
Avatar
i didnt
Avatar
I doubt we'll get compute cores this closely linked to the cpu outside of M1 anytime soon though and going thru pci there is always a real latency concern
Avatar
Jupstar ✪ BOT 2021-10-28 14:22:47Z
its mostly the memory in m1 that makes it so fast i guess
Avatar
and i wonder what kinds of hidden instructions or stuff apple processors have
14:22
this reminded me of a rly good vid i saw
14:23
about the mastermind that made a compiler with only movs
14:23
cant remember now
Avatar
Jupstar ✪ BOT 2021-10-28 14:23:11Z
amd's 3rd gen is basically only increase cache size and get 20% more perf
14:23
A processor is not a trusted black box for running code; on the contrary, modern x86 chips are packed full of secret instructions and hardware bugs. In this talk, we'll demonstrate how page fault analysis and some creative processor fuzzing can be used to exhaustively search the x86 instruction set and uncover the secrets buried in your chipset.
14:23
this video is insane
14:23
i have to rewatch it
Avatar
apple uses arm arch now
Avatar
Jupstar ✪ BOT 2021-10-28 14:24:32Z
x86 is also sooooo old, i really wish a modern CISC would exists, designed with instructions that make sense in 2021
Avatar
Well it's the fact that m1 has unified memory that makes it so efficient. Consoles also use this to get amazing performance.
Avatar
Avatar
Jupstar ✪
x86 is also sooooo old, i really wish a modern CISC would exists, designed with instructions that make sense in 2021
i also would like that
14:24
im sure shitload of stuff changed
Avatar
Why would you want a modern CISC? RISC >>>> CISC 😛
Avatar
Jupstar ✪ BOT 2021-10-28 14:25:10Z
arm is also not really RISC
14:25
anymore
Avatar
isnt making a modern instruction set would also remove the need to conditionally enable simd stuff and so on
Avatar
I wish RISC-V would get some more attention
Avatar
wow my english sucks at that sentence
14:26
xd
Avatar
Jupstar ✪ BOT 2021-10-28 14:26:24Z
but i feel that
14:26
i think NEON didnt exist before v7
Avatar
With a RISC fixed-length ISA you could feasibly read bytecode even. It'd make disassemblers so much easier to implement. It'd also simplify the decode step immensely
Avatar
Jupstar ✪ BOT 2021-10-28 14:28:59Z
yeah thats true
14:29
i wonder how much diff the 5nm makes, i really wonder how close apple is to x86 desktop chips
14:29
but they need all the same circumstances to compare, and more software, not only video editors
Avatar
Apparently the nm thing is a bit deceptive. I wonder if we should start talking in terms of transistor density instead or sth
Avatar
Jupstar ✪ BOT 2021-10-28 14:30:29Z
and ofc, i wonder how they arch would scale to a desktop chip, so 100-200 watt TDP
Avatar
is alder lake 10nm?
14:30
ye
Avatar
Jupstar ✪ BOT 2021-10-28 14:30:48Z
yeah thats true, but i mean like if they all makes their chips at the same company (@Learath2)
Apparently the nm thing is a bit deceptive. I wonder if we should start talking in terms of transistor density instead or sth
Avatar
im still a amd fan tho
14:31
im happy with my 5600x
Avatar
Seems intels 10nm process lead to a similar transistor size to tsmcs 7nm process
Avatar
Jupstar ✪ BOT 2021-10-28 14:32:14Z
intel seems to be good in also making other stuff smaller, e.g. the memory controler
14:32
i read somewhere a year ago or smth, that these are still often in 30nm+
Avatar
I'm a huge fan of big-core little-core btw. It's something I wished existed for years
14:32
Hope AMD comes out with a hybrid offering soon too
Avatar
Jupstar ✪ BOT 2021-10-28 14:33:16Z
but only for laptops?
Avatar
Avatar
Jupstar ✪
but only for laptops?
Alder Lake is a desktop cpu, so not anymore 😛
Avatar
Jupstar ✪ BOT 2021-10-28 14:33:46Z
for desktop it seems like the motherboard is more powerhungry in idle
Avatar
Power savings are not the only concern. With the OS Scheduler cooperating with the cpu, and the fact that you can fit multiple small cores instead of one big core, we might finally get a more responsive system
Avatar
Jupstar ✪ BOT 2021-10-28 14:36:41Z
oh ok, possible yeah, i am not that much into what causes most latency bottlenecks :D
Avatar
Jupstar ✪ BOT 2021-10-28 15:04:39Z
@Learath2: have you tried to build the server in a clean environment? maybe even with LTO to make sure its not data curroption, i also had data curroption after the bug in detect.h
15:04
for the server bug
15:05
(data curroption in the build process bcs of ODR)
15:06
i really cant find anything broken else :/
Avatar
The fact that it happens randomly makes it so hard to check
Avatar
ye sucks
15:12
did u try it with jupstar new patch
15:12
that fixes the data race?
15:12
maybe it changed when i removed those volatiles
15:12
i doubt tho
15:12
xd
15:13
15:13
monkaS
Avatar
Jupstar ✪ BOT 2021-10-28 15:13:48Z
its only client :D (@Ryozuki)
that fixes the data race?
Avatar
Jupstar ✪ BOT 2021-10-28 15:14:14Z
yeah but i'd really suggest trying it, as said i also had ODR errors when i rebased without clearing the build dir (@Learath2)
The fact that it happens randomly makes it so hard to check
15:14
maybe
Avatar
Jupstar ✪ BOT 2021-10-28 15:14:38Z
after the detect.h defect
Avatar
the reentry guard
15:14
guards*
15:14
need to be atomic?
15:14
15:14
heinrich told me they didnt
Avatar
Jupstar ✪ BOT 2021-10-28 15:14:59Z
i dont think so as i dont see another thread using it
15:15
12 days ago
15:15
when did the crashes first happen?
Avatar
atleast 5 days ago
Avatar
Jupstar ✪ BOT 2021-10-28 15:16:09Z
  • Haiku is Unix-like, but it still doesn&#39;t use libnotify.
  • Haiku comes with its own sets of definitions for certain long variables. There&#39;s still a problem revolving around the v...
15:16
the bug was added 13. september
15:18
i'd just add smth like -DCMAKE_CXX_FLAGS="-flto" -DCMAKE_C_FLAGS="-flto" -DCMAKE_EXE_LINKER_FLAGS="-flto" and see what the build says
15:18
and then remove it again if nothing is shown
15:18
(on the old build dir)
Avatar
are servers built with o3 or o2
15:19
maybe its a miscompilation xd
Avatar
Jupstar ✪ BOT 2021-10-28 15:20:52Z
i guess normal release flags so o2
15:20
server isnt really hungry
15:21
or revert some changes and see when it happened, it seems like they happen every day
15:25
@Learath2: are the servers always cleanly built? or are the old build dirs reused?
Avatar
Jupstar: clean build
Avatar
Jupstar ✪ BOT 2021-10-28 15:31:42Z
mhh too bad
Avatar
rm -rf ../master-build mkdir ../master-build cd ../master-build cmake ../master -DANTIBOT=ON -DWEBSOCKETS=OFF -DMYSQL=ON -DCLIENT=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo make DDNet-Server map_convert_07 map_optimize
Avatar
Jupstar ✪ BOT 2021-10-28 15:32:37Z
alright, from the latest UBSan report it looks like it gets mem_zero'd somehow
15:32
vptr is 0
15:32
thats not really common
15:34
@deen: so whats the plan, revert some commits and see what happens?, i guess it must be somwhere from the anti startline skips until master
Avatar
I have no plan
15:35
I could check dmesg on the servers to see when regular crashes started, but I wouldn't 100% be sure that it's those
Avatar
I'm so lost, the entity we seem to be ticking on has no reference in the entire memory space of the process
15:36
where are we getting this weird entity even?
Avatar
Actually this address isn't even mapped??
Avatar
Jupstar ✪ BOT 2021-10-28 15:40:56Z
the fact that all sanitizers cant catch it really speaks for either uninitialized, data race or logic error
15:41
but that should be ez to find in the commits
15:41
since its no overflow
Avatar
AHA I think I have an idea
Avatar
Jupstar ✪ BOT 2021-10-28 15:42:51Z
ok tw also uses memory pools, so i dunno how the sanitizers react to it :D
Avatar
Hm this member variable m_pNextTraverseEntity is so sus
15:44
Why is it a member variable?
Avatar
Jupstar ✪ BOT 2021-10-28 15:46:41Z
yeah looks like it makes no sense
15:46
but also doesnt see any problem with it
15:47
but maybe its used recursivly somewhere
15:47
RemoveEntity for example, so i guess it can make sense
Avatar
The problem is this insane value out of nowhere, I don't see this memory address referenced on any of the linked lists
15:54
There seems to be no alive characters, and m_apFirstEntityTypes[ENTTYPE_CHARACTER] is indeed 0x0
Avatar
Avatar
Jupstar ✪
RemoveEntity for example, so i guess it can make sense
I think you are on to something there
15:59
that code looks very very sus
16:07
christmas is soon
Avatar
Hm, the member thing seems to be to ensure that if within Tick an entity gets removed the traversal doesn't break
16:08
Neither draggers nor pickups kill you, right?
Avatar
Jupstar ✪ BOT 2021-10-28 16:09:34Z
i mean deen is right, that its sus that it always happens if a player leaves
16:10
it somehow has to happen before the tick starts, but besides the antibot i dont see anything
Avatar
It seems to always happen when a player leaves than another kills
Avatar
Jupstar ✪ BOT 2021-10-28 16:10:39Z
yeah true
Avatar
wouldnt that be awesome to create tests with the headless server we can now have
16:10
maybe we could reproduce tick perfect bugs
16:11
headless client
16:11
idk what im talking
Avatar
Jupstar ✪ BOT 2021-10-28 16:13:18Z
[2021-10-27 10:21:06][server]: client dropped. cid=9 addr=<{X}> reason='' [2021-10-27 10:21:06][game]: kill killer='9:Maybe.' victim='9:Maybe.' weapon=-3 special=0 [2021-10-27 10:21:06][chat]: *** 'Maybe.' has left the game [2021-10-27 10:21:06][game]: leave player='9:Maybe.' [2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-1 special=0 [2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-2 special=0He leaves and his dummy dies in spikes and self kills afterwards ? XD
16:13
that alone is sus
16:14
maybe u just have to kill while the world kills you or smth, but why the player leave? maybe a bug in the dummy code that does it for some reason?
Avatar
Hm maybe the dummy also left but it crashed before that leave went through?
Avatar
Jupstar ✪ BOT 2021-10-28 16:15:29Z
possible yeah
16:16
i wonder if that was on dummy maps
16:16
where e.g. startline kills you
Avatar
Jupstar ✪ BOT 2021-10-28 16:38:14Z
mhh the startline skip kills you when someone leaves the team after you hit the start line, and thats the only commit that changed kill behavior lately
Avatar
I found some stack addresses where the insane entity pointer is found, not sure how best to figure out what was stored in these stack variables
Avatar
Jupstar ✪ BOT 2021-10-28 16:42:11Z
from the flow it would fit
16:42
it kills the char in the world tick, then self kills in team start line skip tick
16:43
(it uses WEAPON_SELF)
Avatar
Jupstar ✪ BOT 2021-10-28 16:50:52Z
too bad that we dont log the server tick
16:51
only self kill that happens after the tick is this i think, the rest are console commands
Avatar
What's the difference between these?
Avatar
Jupstar ✪ BOT 2021-10-28 17:06:20Z
fullscreen minimizes the other doesnt fullscreen might disable stuff like the windows compositor so its exclusive also you can only change fullscreen resolution with fullscreen
Avatar
so Desktop fullscreen uses like the native resolution only? (edited)
Avatar
Jupstar ✪ BOT 2021-10-28 17:08:38Z
it uses your desktops resolution
Avatar
ah ok
17:08
ty
Avatar
Woah uh oh hmm
Avatar
Jupstar ✪ BOT 2021-10-28 17:36:41Z
@Learath2: just remove all these pool hacks and let asan detect the issue then we know xd, cant be that hard
Avatar
Avatar
Jupstar ✪
[2021-10-27 10:21:06][server]: client dropped. cid=9 addr=<{X}> reason='' [2021-10-27 10:21:06][game]: kill killer='9:Maybe.' victim='9:Maybe.' weapon=-3 special=0 [2021-10-27 10:21:06][chat]: *** 'Maybe.' has left the game [2021-10-27 10:21:06][game]: leave player='9:Maybe.' [2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-1 special=0 [2021-10-27 10:21:06][game]: kill killer='10:[D] Maybe.' victim='10:[D] Maybe.' weapon=-2 special=0He leaves and his dummy dies in spikes and self kills afterwards ? XD
The last two kills in a row seems like what you get when the team is locked and someone dies from kill tiles
Avatar
Jupstar ✪ BOT 2021-10-28 19:31:32Z
i guess the starting date of the crashes could already help
Avatar
I could imagine this fixes #4263

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/...
Avatar
cc87d49 Reset text color after kill messages are created - Jupeyy 7829cf1 Merge #4264 - bors[bot]
Exported 420 message(s)