Special unicode character causes timeout
tennox opened this issue · comments
Type of bug
Timeout
Version
0.0.12
Did you test against master?
- Certainly
Error message (if not timeout)
cat test.conf | dconf2nix --verbose
dconf: "[org/gnome/Characters]\nrecent-characters=['\10149']\n"
dconf2nix: 💥 The process timed out.
DConf input
[org/gnome/Characters]
recent-characters=['➥']
Additional context
I developed this method to identify the problematic part of the dconf output - maybe this can be helpful for troubleshooting
1. Split dconf in parts on each newline - http://stackoverflow.com/questions/33294986/ddg#33297878
dconf dump / | awk -v RS= '{print > ("dconf-" NR ".conf")}'
2. Try dconf2nix on all parts to identify & print the problematic part
for f in dconf-*.conf; do
echo -n $f
if dconf2nix -e < $f > /dev/null 2>&1; then
echo " -> SUCCESS"
else
echo " -> ERROR:"
cat $f
echo #newline
fi
done
I see you fixed a similar issue in https://github.com/gvolpe/dconf2nix/pull/68/files - but I think adding all possible characters is not viable, is there a better way? Maybe a exclude pattern instead of include?
@tennox, your process helped me solve a major freeze on my system that would drive dconf2nix
to consume my entire 64 GB of ram only to die. I found my problem process almost immediately. 🥳
The timeouts were fixed by #80.