Commit Graph

3652 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer 43a77b8a70 all: release mars0.1astable174 2024-02-22 11:00:17 +01:00
Thomas Schoebel-Theuer e735fc9bf6 main: prevent fetch hangs 2024-02-20 08:39:43 +01:00
Thomas Schoebel-Theuer c0b0d69f6f main: prevent sync hangs 2024-02-20 08:39:43 +01:00
Thomas Schoebel-Theuer 5966c93f3b infra: adapt to prepatch v3a 2024-02-07 10:55:41 +01:00
Thomas Schoebel-Theuer 8094a5f2c7 all: release mars0.1astable173 2024-01-23 10:05:08 +01:00
Thomas Schoebel-Theuer 27405674c5 net: fix potential recursion over allocation 2024-01-23 10:05:01 +01:00
Thomas Schoebel-Theuer 6caf5ef195 net: use SK_CAN_REUSE 2024-01-23 10:04:53 +01:00
Thomas Schoebel-Theuer ef0b97efd4 server: delay startup upon overload 2024-01-23 10:04:48 +01:00
Thomas Schoebel-Theuer a0dec08f8e all: release mars0.1astable172 2024-01-23 10:03:36 +01:00
Thomas Schoebel-Theuer 0f49f0f03b marsadm: add warning on forced disk open 2024-01-23 09:55:29 +01:00
Thomas Schoebel-Theuer 535a376084 main: silence compiler warning 2024-01-23 09:55:04 +01:00
Thomas Schoebel-Theuer 6c651dc389 mem: silence compiler warning 2024-01-23 09:54:52 +01:00
Thomas Schoebel-Theuer 1a5d22e428 mem: add cond_resched() 2024-01-23 09:54:42 +01:00
Thomas Schoebel-Theuer aba543090f main: improve prosumer preallocation 2024-01-23 09:53:39 +01:00
Thomas Schoebel-Theuer f0304dd7cd infra: round up output_size to even sizes and addresses 2024-01-23 09:50:31 +01:00
Thomas Schoebel-Theuer 598cfc9d67 infra: round up input_size to even sizes and addresses 2024-01-23 09:50:24 +01:00
Thomas Schoebel-Theuer bd3fa16b64 infra: round up brick_size to even sizes and addresses 2024-01-23 09:50:18 +01:00
Thomas Schoebel-Theuer cb517683bb infra: round up aspects to even sizes and addresses 2024-01-23 09:50:10 +01:00
Thomas Schoebel-Theuer d5e7798310 copy: avoid race between run_copy() and clash 2024-01-23 09:50:02 +01:00
Thomas Schoebel-Theuer 9fbaf12362 client: remove unused tmp_head 2024-01-23 09:49:53 +01:00
Thomas Schoebel-Theuer 8ae8aef045 all: release mars0.1astable171 2023-09-22 10:31:21 +02:00
Thomas Schoebel-Theuer a1893cc11c client: safeguard list_del 2023-09-20 10:43:15 +02:00
Thomas Schoebel-Theuer e04202601d client: simplify _do_resubmit() 2023-09-20 08:54:46 +02:00
Thomas Schoebel-Theuer 088afed02f bio: fix missing cond_resched() 2023-09-14 16:17:26 +02:00
Thomas Schoebel-Theuer a6ae180c1d all: release mars0.1astable170 2023-09-06 15:32:07 +02:00
Thomas Schoebel-Theuer dd6cf9a980 marsadm: remove obsolete compat deletions part 2 2023-09-06 12:11:35 +02:00
Thomas Schoebel-Theuer 13da5541ed marsadm: remove obsolete compat deletions part 1 2023-09-06 12:11:16 +02:00
Thomas Schoebel-Theuer ced0971b4b marsadm: warn on missing directory at join-cluster 2023-09-06 12:09:55 +02:00
Thomas Schoebel-Theuer 22606719b4 marsadm: remove compat_alivelinks 2023-09-06 12:09:23 +02:00
Thomas Schoebel-Theuer 299ec5c6bf marsadm: fix warning in check_sizes 2023-08-29 11:22:26 +02:00
Thomas Schoebel-Theuer 3c4c1c3c91 all: release mars0.1astable169 2023-08-24 14:09:17 +02:00
Thomas Schoebel-Theuer 2d8fefb8f5 main: remove obsolete deletion method 2023-08-22 12:10:46 +02:00
Thomas Schoebel-Theuer 8e63032af3 main: remove obsolete compat_deletions 2023-08-22 12:10:46 +02:00
Thomas Schoebel-Theuer 9f0a53487e main: remove compat alivelinks
Now superseded by automatic actual dir creation.
2023-08-14 13:43:44 +02:00
Thomas Schoebel-Theuer 90a6c6e0c0 main: ensure inital presence of actual dir 2023-08-14 13:43:44 +02:00
Thomas Schoebel-Theuer de25b2e1ba all: release mars0.1astable168 2023-08-07 16:20:13 +02:00
Thomas Schoebel-Theuer e273447add copy: improve state barriers 2023-08-07 16:09:50 +02:00
Thomas Schoebel-Theuer 7c59774177 copy: safeguard writeout flag 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer b53b3777d4 copy: safeguard allocation barriers 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer 7caf2341ea copy: safeguard allocation problems 2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer 49c408cac2 copy: constify state table subpages
I have seen some "strange" behaviour so infrequently, so I am unsure whether
this is a bugfix at all.

I am unsure, whether this _suspected_ bug would be in gcc, or whether
the bug would be mine.

If it is mine, then I assumed that gcc would produce better machine code
than required by ISO C.

Currently, I don't (yet) have the newest version of the ISO C standard,
so I cannot claim the truth.

Whatever: I found the _suspected_ bug by _dissassembling_ before vs after this
patch had been applied:

        .type   copy_brick_construct, @function                                                                 .type   copy_brick_construct, @function
copy_brick_construct:                                                                                   copy_brick_construct:
                                                                                                   >            pushq   %r13    #
        pushq   %r12    #                                                                                       pushq   %r12    #
        pushq   %rbp    #                                                                          |    # block/mars/kernel/mars_copy.c:        st = brick_block_alloc(0, PAGE_SIZE);
        movl    $1155, %edx     #,                                                                 <
                                                                                                   >            pushq   %rbp    #
        pushq   %rbx    #                                                                                       pushq   %rbx    #
        movl    $4096, %esi     #,                                                                 <
        movq    %rdi, %rbx      # brick, brick                                                     |            movq    %rdi, %r12      # brick, brick
                                                                                                   >            movl    $4096, %esi     #,
        xorl    %edi, %edi      #                                                                               xorl    %edi, %edi      #
        call    _brick_block_alloc      #                                                                       call    _brick_block_alloc      #
        movq    %rax, %rdx      #, tmp99                                                           |            movq    %rax, %rbx      #, _res_
        movl    $1024, %ecx     #, tmp102                                                                       movl    $1024, %ecx     #, tmp102
        movq    %rax, 408(%rbx) # tmp99, brick_11(D)->st                                           <
        movq    %rdx, %rdi      # tmp99, tmp99                                                     <
        xorl    %eax, %eax      # tmp101                                                                        xorl    %eax, %eax      # tmp101
        xorl    %ebp, %ebp      # ivtmp.179                                                        |            movq    %rbx, %rdi      # _res_, _res_
        xorl    %r12d, %r12d    # tmp106                                                           <
        rep stosl                                                                                               rep stosl
                                                                                                   >            xorl    %ebp, %ebp      # ivtmp.174
                                                                                                   >            xorl    %r13d, %r13d    # tmp105
.L26:                                                                                                   .L26:
        movl    $1172, %edx     #,                                                                 |            movl    $1177, %edx     #,
        movl    $4096, %esi     #,                                                                              movl    $4096, %esi     #,
        xorl    %edi, %edi      #                                                                               xorl    %edi, %edi      #
        call    _brick_block_alloc      #                                                                       call    _brick_block_alloc      #
        movq    %rax, %rdx      #, tmp103                                                                       movq    %rax, %rdx      #, tmp103
        movq    408(%rbx), %rax # brick_11(D)->st, brick_11(D)->st                                 |            movq    %rdx, (%rbx,%rbp,8)     # tmp103, MEM[base: _res__9, index: ivtmp.174_28, step:
                                                                                                   >            incq    %rbp    # ivtmp.174
        movl    $1024, %ecx     #, tmp107                                                          |            movq    %rax, %rdi      # tmp103, _res_
        movq    %rdx, %rdi      # tmp103, tmp103                                                   |            movl    $1024, %ecx     #, tmp106
        movq    %rdx, (%rax,%rbp)       # tmp103, *_4                                              <
        addq    $8, %rbp        #, ivtmp.179                                                       <
        movl    %r12d, %eax     # tmp106, tmp106                                                   <
        cmpq    $2048, %rbp     #, ivtmp.179                                                       |            cmpq    $256, %rbp      #, ivtmp.174
        rep stosl                                                                                               rep stosl
        jne     .L26    #,                                                                                      jne     .L26    #,
        leaq    376(%rbx), %rdi #, tmp108                                                          |            leaq    376(%r12), %rdi #, tmp107
        movq    $__key.72209, %rdx      #,                                                         |            movq    $__key.72227, %rdx      #,
        movq    $.LC3, %rsi     #,                                                                              movq    $.LC3, %rsi     #,
        call    __init_waitqueue_head   #                                                                       call    __init_waitqueue_head   #
                                                                                                   >    # block/mars/kernel/mars_copy.c:        brick->st = st;
                                                                                                   >            movq    %rbx, 408(%r12) # _res_, brick_10(D)->st
        xorl    %eax, %eax      #                                                                               xorl    %eax, %eax      #
        popq    %rbx    #                                                                                       popq    %rbx    #
        popq    %rbp    #                                                                                       popq    %rbp    #
        popq    %r12    #                                                                                       popq    %r12    #
                                                                                                   >            popq    %r13    #
        ret                                                                                                     ret

Hint: the 2-dimenional array indexing looks _suspicious_ to me.

But analysis is not as easy as one might assume.

Please help me:

If this would be really a bug in gcc (I am not sure), it should be fixed
by the upstream of gcc. Please contact me if you know / can show that

  (a) if it is _really_ a bug (currently very hard to reproduce via MARS), and
  (b) the bug is really in gcc but not mine (unsure for now), and
  (c) how to convert this into a _reproducer_ for the gcc team.

I am not sure whether this is a _full_ reproducer, because it might
depend on the arch (amd64) and/or on specific Linux kernel compile options.

I don't have the time for ananlysis of all of these, or maybe even more
thingies to do.
2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer 602d1380ec copy: reduce address evaluation
Prototect against future use of ++ operators in arguments ;)
2023-08-07 16:08:55 +02:00
Thomas Schoebel-Theuer 44f371ca7f copy: convert state lvalues to references 2023-08-07 16:08:52 +02:00
Thomas Schoebel-Theuer 976857a9d7 copy: fix indirect race from index wraparound 2023-08-03 13:24:47 +02:00
Thomas Schoebel-Theuer d3e70f11da all: release mars0.1astable167 2023-07-13 08:55:48 +02:00
Thomas Schoebel-Theuer 226a241311 marsadm: cron should delete even on closed primaries 2023-07-12 13:22:24 +02:00
Thomas Schoebel-Theuer 6f6ef7a849 marsadm: fix versionlink deletion at cron 2023-07-12 13:15:46 +02:00
Thomas Schoebel-Theuer da5e5cb9c1 all: release mars0.1astable166 2023-05-30 10:49:55 +02:00
Thomas Schoebel-Theuer ae8e7611d5 copy: simplify notify_clash() 2023-05-30 10:49:55 +02:00
Thomas Schoebel-Theuer bdf8d6e7eb copy: safeguard potential race 2023-05-30 10:49:55 +02:00