Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: rurban/task_in…
Commits on Dec 13, 2012
  1. @rurban
  2. @rurban

    add Task.get_integer, test wrong getinterp in Task

    rurban authored
    Inside a task getinterp should not return the global interp PMC from
    the parent thread. Any function should know in which thread tid or task.id it runs.
    We have no introspection to get the curent task nor interp.
  3. @rurban

    [t] Improve timing of task_kill

    rurban authored
    The timing was too instable. Also rename the task and code.
  4. @rurban
  5. @rurban

    Merge branch 'report_gmp_version'

    rurban authored
    Tested ok on linux and mingw (windows), with gmp 5.0.5.
  6. @rurban

    Merge branch 'check_for_git_binary_gh477'

    rurban authored
    Smoked ok on win32 with .git and without git binary, and on linux ditto.
    http://smolder.parrot.org/app/projects/report_details/32919
  7. @rurban
  8. @rurban
  9. @leto
  10. @leto
  11. @leto
  12. @leto

    [config] Report GMP version from Configure.pl

    leto authored
    This information was not stored or shown anywhere else, which makes it
    inconvenient to debug issues relating to GMP.
Commits on Dec 12, 2012
  1. @rurban

    [cage] fix wrong UNUSED(INTERP) in core.ops,experimental.ops

    rurban authored
    This came up when doing make bootstrap-ops
  2. @rurban
  3. @leto @rurban

    Improve the name and description of mime_base64.t

    leto authored rurban committed
  4. @rurban
  5. @rurban

    Revive ParrotInterpreter.get_integer to return the thread id

    rurban authored
    This was disabled with the kill_threads branch, end of 2011
  6. @rurban

    [doc] mark test_more, Test::Builder as not thread-safe

    rurban authored
    The counter updates need to be schedule_proxied in the parent task
  7. @rurban

    [doc] Update pdd25_concurrency (a bit)

    rurban authored
    Hilight our current hybrid threading model.
    
    Several methods are missing:
    e.g. wait TASK, threaded writes, Task send, invoke,
    pass
  8. @rurban

    Fix a thread race condition in Parrot_alarm_runloop

    rurban authored
    Racy write with read in Parrot_alarm_check, lock alarm_serial += 1;
    
    $ tsan ./parrot t/pmc/task.t
    ok 9 pre-empt and exit
    ==18766== INFO: T0 is program's main thread
    ==18766== INFO: T1 has been created by T0. Use --announce-threads to see the creation stack.
    ==18766== WARNING: Possible data race during write of size 8 at 0x5322580: {{{
    ==18766==    T1 (L{}):
    ==18766==     #0  Parrot_alarm_runloop /usr/src/parrot/master/src/alarm.c:129
    ==18766==   Concurrent read(s) happened at (OR AFTER) these points:
    ==18766==    T0 (L{}):
    ==18766==     #0  Parrot_alarm_check /usr/src/parrot/master/src/alarm.c:154
    ==18766==     #1  Parrot_cx_check_scheduler /usr/src/parrot/master/src/scheduler.c:253
    ==18766==     #2  Parrot_branch_ic /usr/src/parrot/master/src/ops/core_ops.c:13735
    ==18766==     #3  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==18766==     #4  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==18766==     #5  runops /usr/src/parrot/master/src/call/ops.c:123
    ==18766==     #6  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==18766==     #7  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==18766==     #8  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==18766==     #9  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==18766==   Address 0x5322580 is 0 bytes inside data symbol "alarm_serial"
    ==18766==    Race verifier data: 0x4FEC3AE,0x4FEC3FB
    ==18766== }}}
  9. @rurban

    Fix a threads race condition with Task_nci_send/Task_invoke

    rurban authored
    Postpone TASK_recv_block_CLEAR(partner) when another task wants to check
    !TASK_in_preempt_TEST(_self)
    
    $ tsan ./parrot t/pmc/task.t
    ==6406== ThreadSanitizer, a data race detector
    1..8
    ok 1 - initialized
    ok 2 task1 ran
    ok 3 task2 ran
    ok 4 sub1 ran
    ==6406== INFO: T2 has been created by T0. Use --announce-threads to see the creation stack.
    ==6406== INFO: T0 is program's main thread
    ==6406== WARNING: Possible data race during write of size 8 at 0x43A6218: {{{
    ==6406==    T0 (L{L31}):
    ==6406==     #0  Parrot_Task_nci_send /usr/src/parrot/master/src/pmc/task.c:316
    ==6406==     #1  Parrot_NativePCCMethod_invoke /usr/src/parrot/master/src/pmc/nativepccmethod.c:122
    ==6406==     #2  Parrot_callmethodcc_p_sc /usr/src/parrot/master/src/ops/core_ops.c:18300
    ==6406==     #3  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==6406==     #4  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==6406==     #5  runops /usr/src/parrot/master/src/call/ops.c:123
    ==6406==     #6  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==6406==     #7  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #8  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==6406==     #9  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #10 Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #11 Parrot_cx_next_task /usr/src/parrot/master/src/scheduler.c:231
    ==6406==   Concurrent read(s) happened at (OR AFTER) these points:
    ==6406==    T2 (L{}):
    ==6406==     #0  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:175
    ==6406==     #1  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #2  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #3  Parrot_cx_next_task /usr/src/parrot/master/src/scheduler.c:231
    ==6406==     #4  Parrot_thread_outer_runloop /usr/src/parrot/master/src/thread.c:322
    ==6406==   Location 0x43A6218 is 1544 bytes inside a block starting at 0x43A5C10 of size 4096 allocated by T0 from heap:
    ==6406==     #0  calloc /mnt/data/build/slave/full_linux_build/build/tsan/ts_valgrind_intercepts.c:444
    ==6406==     #1  mem_sys_allocate_zeroed /usr/src/parrot/master/src/gc/alloc_memory.c:97
    ==6406==     #2  allocate_new_pool_arena /usr/src/parrot/master/src/gc/fixed_allocator.c:547
    ==6406==     #3  pool_allocate /usr/src/parrot/master/src/gc/fixed_allocator.c:448
    ==6406==     #4  Parrot_gc_pool_allocate /usr/src/parrot/master/src/gc/fixed_allocator.c:344
    ==6406==     #5  gc_gms_allocate_pmc_header /usr/src/parrot/master/src/gc/gc_gms.c:1490
    ==6406==     #6  Parrot_gc_new_pmc_header /usr/src/parrot/master/src/gc/api.c:312
    ==6406==     #7  get_new_pmc_header /usr/src/parrot/master/src/pmc.c:571
    ==6406==     #8  Parrot_pmc_new_init /usr/src/parrot/master/src/pmc.c:630
    ==6406==     #9  Parrot_thread_create_proxy /usr/src/parrot/master/src/thread.c:156
    ==6406==   Locks involved in this report (reporting last lock sites): {L31}
    ==6406==    L31 (0x42F02A8)
    ==6406==     #0  pthread_mutex_lock /mnt/data/build/slave/full_linux_build/build/tsan/ts_valgrind_intercepts.c:935
    ==6406==     #1  Parrot_Task_nci_send /usr/src/parrot/master/src/pmc/task.c:312
    ==6406==     #2  Parrot_NativePCCMethod_invoke /usr/src/parrot/master/src/pmc/nativepccmethod.c:122
    ==6406==     #3  Parrot_callmethodcc_p_sc /usr/src/parrot/master/src/ops/core_ops.c:18300
    ==6406==     #4  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==6406==     #5  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==6406==     #6  runops /usr/src/parrot/master/src/call/ops.c:123
    ==6406==     #7  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==6406==     #8  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #9  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==6406==     #10 Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #11 Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==    Race verifier data: 0x5168EC1,0x516785D
    ==6406== }}}
    ok 5 Got message after block
    ok 6 Got existing message
    ok 7 task_to_kill running
    ok 8 task_to_kill killed
    ==6406==
    ==6406== ThreadSanitizer summary: reported 1 warning(s) (1 race(s))
  10. @rurban

    [GH #881] Do not ignore the exit opcode argument, fix t/pmc/task.t

    rurban authored
    The argument for the exit op is ignored, parrot always exits with 1.
    
    die_from_exception() uses Parrot_x_jump_out(interp, 1); even if the given exit_code was 0
    (branch severity == EXCEPT_exit)
    
    t/pmc/task.t cannot use test_more as ok updates the counter in a non-thread safe way.
    we also cannot use say as say is non-atomic, the final \n can be printed after the concurrent thread
    prints its line.
    sleep is also concurrent, so better use a poor mans busy sleep to wait to the task to be killed.
    The numbers seem to stable now, tested on a pretty fast multicore machine.
  11. @rurban

    [GH #836] pmc2c Sanify parameters beforehand and detect empty bodies

    rurban authored
    This leaves with a single remaining clang warning for math.ops, and several unrelated
    gcc warnings left. null, default and proxy are also detected correctly now.
  12. @rurban

    Fix wrong Parrot::Pmc2c::Method::decl

    rurban authored
    Failed when not in first line (s///m missing)
  13. @rurban
  14. @rurban
  15. @rurban

    [GH #836] Improved pmc2c

    rurban authored
    support multiple shim'able parameters
    warns on not SHIM'ed parameters, possibly internal unused variables
    warns on possibly forgotten UNUSED(param) declarations
    warns on an possible internal recursion error, when the UNUSED decl could not be replaced
    skips SHIM'ing method bodies with #if
    detect empty bodies and adds SHIM'ed INTERP and SELF params automatically
Commits on Dec 11, 2012
  1. @rurban
  2. @rurban
  3. @rurban

    [cage] Fix various cage compiler warnings

    rurban authored
    Shadowed variables from upper scope.
    SHIM unused interp,
    Remove unused local variables
    make headerizer
    Add documentation on unused arguments
  4. @rurban

    ParrotInterpreter.get_integer returns now the task id

    rurban authored
    Before it was hardcoded to 0.
    Add note that the tid ATTR is still unused.
  5. @rurban
  6. @rurban

    cage] move -Wcast-align to --cage, special-case src/string/sprintf.c,…

    rurban authored
    … spf_render.c
    
    add -Wno-unused-parameter to compilers/imcc/imclexer.c
    Only one math.ops unused-parameter warning remains with ICONST not needing INTERP.
    parrot is now warnings clean with clang, clang++, gcc and g++, besides the remaining
    pmc2c default, Null and Proxy UNUSED fixes
  7. @rurban

    [cage] Fix -Wreturn-type

    rurban authored
    control may reach end of non-void function in Parrot_interp_info_s()
    Return empty string in case of errors
  8. @rurban
Something went wrong with that request. Please try again.