• 1 Post
  • 7 Comments
Joined 3 months ago
cake
Cake day: August 10th, 2026

help-circle
  • The initially observed issue was failing tests in our test suite. As I traced that through I eventually landed on a Rust function that returned a bool to Mercury code. Logging the value on the Rust side was fine, but then attempting to log the same value on the Mercury side was crashing the Mercury runtime. Eventually I logged the value from a C foreign_proc in Mercury and was seeing it was receiving the value 16 instead of 0 or 1. It was at this point that I suspected a compiler bug. Comparing the assembly of the function was also suspect:

    1.99:
    
    Disassembly of section .text.fontcode_rust_font_has_glyf:
    
    0000000000000000 <fontcode_rust_font_has_glyf>:
           0: 0f b6 87 9f 01 00 00          movzbl  0x19f(%rdi), %eax
           7: c3                            retq
    
    
    1.83:
    
    Disassembly of section .text.fontcode_rust_font_has_glyf:
    
    0000000000000000 <fontcode_rust_font_has_glyf>:
           0: 0f b6 87 9f 01 00 00          movzbl  0x19f(%rdi), %eax
           7: 24 01                         andb    $0x1, %al
           9: c3                            retq
    

    From there I was able to build a small reproducer and open an issue on the rust repo.


    score 1 · canonical







  • I run a Chimera mirror at https://au.mirror.7bit.org/. To ensure atomic updates I use the atomic-rsync script, which is included in Rsync tarballs, but is not currently part of the Chimera rsync package (the mirror server runs Chimera).

    atmoic-rsync manages a pair of directories, syncing into the inactive one, then swapping a symlink when the sync is done so what’s returned by the web server switches instantly. atomic-rsync uses the --link-dest option to populate the tree being synced from the currently active one to avoid storing duplicates of unchanged data.

    This has worked well, although occasionally rsync would get stuck, or take a long time and the syncs would start overlapping. That was solved by invoking it with flock. My full cron line is:

    30 *  *   *   *   chimera flock -w 59 /var/run/lock/chimera-rsync.lock /usr/local/bin/atomic-rsync -ah rsync://repo.chimera-linux.org/chimera/ /home/chimera/www/chimera/ && date -Iseconds > /var/www/chimera-sync.txt
    

    When I set this up I wasn’t aware of the mechanism q66 used on the Buildbot workers, if I’d known that then I could have done the same.


    score 3 · canonical