[Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).

hiren (hiren panchasara) phabric-noreply at FreeBSD.org
Tue Feb 17 18:07:19 UTC 2015


hiren added a comment.

>>! In D1711#92, @rrs wrote:
> Hiren:
> 
> There also should have been a printf before the panic string
>  printf( "spin lock %p (%s) held by %p (tid %d) too long\n",
>             m, m->lock_object.lo_name, td, td->td_tid);
> 
> Can we see what that lovely printf has displayed?

Ah, my bad for not providing that earlier here:


  spin lock 0xffffffff81364180 (callout) held by 0xfffff8000dc0e920 (tid 100111) too long
  panic: spin lock held too long

Now, 


  (kgdb) print *(struct callout *)0xffffffff81364180
  $8 = {c_links = {le = {le_next = 0xffffffff80d03d28, le_prev = 0xb0000}, sle = {sle_next = 0xffffffff80d03d28}, tqe = {tqe_next = 0xffffffff80d03d28, 
        tqe_prev = 0xb0000}}, c_time = 0, c_precision = 4, c_arg = 0x0, c_func = 0, c_lock = 0x0, c_flags = 0, c_cpu = 0}

if I print it's le_next, that node's le_prev is not pointing to 0xffffffff81364180


  (kgdb) print *(struct callout *)0xffffffff80d03d28
    $9 = {c_links = {le = {le_next = 0x74756f6c6c6163, le_prev = 0x6f207265626d754e}, sle = {sle_next = 0x74756f6c6c6163}, tqe = {tqe_next = 0x74756f6c6c6163, 
          tqe_prev = 0x6f207265626d754e}}, c_time = 7307497714779234406, c_precision = 7809632219779637363, c_arg = 0x61206c656568776c, c_func = 0x20657a697320646e, 
      c_lock = 0x6f656d697420666f, c_flags = 690517109, c_cpu = 1701998624}

Also, trying to print le_next or le_prev is not working:



  (kgdb) print *(struct callout *)0x6f207265626d754e
  Cannot access memory at address 0x6f207265626d754e
  (kgdb) print *(struct callout *)0x74756f6c6c6163  
  Cannot access memory at address 0x74756f6c6c6163


Is something wrong here or I am failing to understand this. (The latter has a higher probability)

> 
> In theory the lo_name should be "callout" and the %p should point to &cc_cpu[0].cc_lock
> 
> Can we validate that these align correctly too?

How do I validate it?

REVISION DETAIL
  https://reviews.freebsd.org/D1711

To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky
Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net


More information about the freebsd-net mailing list