Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2506

solaris 10 x86 crash in the ps parsing code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.10.0, 3.9.2
    • Component/s: None
    • Labels:
      None

      Description

      Running the following test under the chroot:

      CFENGINE_TEST_OVERRIDE_WORKDIR="/root/build/core/tests/acceptance/workdir/__00_basics_03_bodies_123_cf" TEMP="/root/build/core/tests/acceptance/workdir/__00_basics_03_bodies_123_cf/tmp" CFENGINE_TEST_OVERRIDE_EXTENSION_LIBRARY_DIR="" LD_LIBRARY_PATH=/root/build/core/libpromises/.libs:/var/cfengine/lib gdb --args ../../cf-agent/.libs/cf-agent -Klf ./00_basics/03_bodies/123.cf -D AUTO,DEBUG -d
      

      Last debug output:

      2016-11-08T15:15:46+0100  verbose: P: .........................................................
      2016-11-08T15:15:46+0100  verbose: P: BEGIN promise 'promise_123_cf_20' of type "processes" (pass 1)
      2016-11-08T15:15:46+0100  verbose: P:    Promiser/affected object: '/bin/true'
      2016-11-08T15:15:46+0100  verbose: P:    From parameterized bundle: test( {"/root/build/core/tests/acceptance/./00_basics/03_bodies/../../dcs.cf.sub"})
      2016-11-08T15:15:46+0100  verbose: P:    Base context class: any
      2016-11-08T15:15:46+0100  verbose: P:    Stack path: /default/default/methods/'any'/default/test_run/methods/'any'/default/test/processes/'/bin/true'[1]
      2016-11-08T15:15:46+0100    debug: Parsing ps line: '    USER   PID %CPU %MEM   SZ  RSS TT      S    STIME        TIME COMMAND'
      2016-11-08T15:15:46+0100    debug:                   ^         ^         ^         ^         ^         ^         ^         ^
      2016-11-08T15:15:46+0100    debug:            Index: 0        10        20        30        40        50        60        70
      2016-11-08T15:15:46+0100    debug: Start of 'USER' is 4
      2016-11-08T15:15:46+0100    debug: Col[0] = 'USER'
      2016-11-08T15:15:46+0100    debug: End of 'USER' is 7
      2016-11-08T15:15:46+0100    debug: Start of 'PID' is 11
      2016-11-08T15:15:46+0100    debug: Col[1] = 'PID'
      2016-11-08T15:15:46+0100    debug: End of 'PID' is 13
      2016-11-08T15:15:46+0100    debug: Start of '%CPU' is 15
      2016-11-08T15:15:46+0100    debug: Col[2] = '%CPU'
      2016-11-08T15:15:46+0100    debug: End of '%CPU' is 18
      2016-11-08T15:15:46+0100    debug: Start of '%MEM' is 20
      2016-11-08T15:15:46+0100    debug: Col[3] = '%MEM'
      2016-11-08T15:15:46+0100    debug: End of '%MEM' is 23
      2016-11-08T15:15:46+0100    debug: Start of 'SZ' is 27
      2016-11-08T15:15:46+0100    debug: Col[4] = 'SZ'
      2016-11-08T15:15:46+0100    debug: End of 'SZ' is 28
      2016-11-08T15:15:46+0100    debug: Start of 'RSS' is 31
      2016-11-08T15:15:46+0100    debug: Col[5] = 'RSS'
      2016-11-08T15:15:46+0100    debug: End of 'RSS' is 33
      2016-11-08T15:15:46+0100    debug: Start of 'TT' is 35
      2016-11-08T15:15:46+0100    debug: Col[6] = 'TT'
      2016-11-08T15:15:46+0100    debug: End of 'TT' is 36
      2016-11-08T15:15:46+0100    debug: Start of 'S' is 43
      2016-11-08T15:15:46+0100    debug: Col[7] = 'S'
      2016-11-08T15:15:46+0100    debug: End of 'S' is 43
      2016-11-08T15:15:46+0100    debug: Start of 'STIME' is 48
      2016-11-08T15:15:46+0100    debug: Col[8] = 'STIME'
      2016-11-08T15:15:46+0100    debug: End of 'STIME' is 52
      2016-11-08T15:15:46+0100    debug: Start of 'TIME' is 61
      2016-11-08T15:15:46+0100    debug: Col[9] = 'TIME'
      2016-11-08T15:15:46+0100    debug: End of 'TIME' is 64
      2016-11-08T15:15:46+0100    debug: Start of 'COMMAND' is 66
      2016-11-08T15:15:46+0100    debug: Col[10] = 'COMMAND'
      2016-11-08T15:15:46+0100    debug: End of 'COMMAND' is 72
      2016-11-08T15:15:46+0100    debug: Parsing ps line: '    root     0  0.0  0.0    0    0 ?       T   Nov_07       01:47 sched'
      2016-11-08T15:15:46+0100    debug:                   ^         ^         ^         ^         ^         ^         ^         ^
      2016-11-08T15:15:46+0100    debug:            Index: 0        10        20        30        40        50        60        70
      2016-11-08T15:15:46+0100    debug: 'USER' field 'root' extracted from between positions 4 and 7
      2016-11-08T15:15:46+0100    debug: 'PID' field '0' extracted from between positions 13 and 13
      2016-11-08T15:15:46+0100    debug: '%CPU' field '0.0' extracted from between positions 16 and 18
      2016-11-08T15:15:46+0100    debug: '%MEM' field '0.0' extracted from between positions 21 and 23
      2016-11-08T15:15:46+0100    debug: 'SZ' field '0' extracted from between positions 28 and 28
      2016-11-08T15:15:46+0100    debug: 'RSS' field '0' extracted from between positions 33 and 33
      2016-11-08T15:15:46+0100    debug: 'TT' field '?' extracted from between positions 35 and 35
      2016-11-08T15:15:46+0100    debug: 'S' field 'T' extracted from between positions 43 and 43
      2016-11-08T15:15:46+0100    debug: 'STIME' field 'Nov_07' extracted from between positions 47 and 52
      2016-11-08T15:15:46+0100    debug: 'TIME' field '01:47' extracted from between positions 60 and 64
      2016-11-08T15:15:46+0100    debug: 'COMMAND' field 'sched' extracted from between positions 66 and 70
      2016-11-08T15:15:46+0100  verbose: Process column ELAPSED/ELAPSED was not supported on this system
      
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 1 (LWP 1)]
      0xfef18729 in StringMapHasKey (map=0x0, key=0x81cdfa0 "0") at map.c:350
      350     TYPED_MAP_DEFINE(String, char *, char *,
      

      Backtrace:

      #0  0xfef18729 in StringMapHasKey (map=0x0, key=0x81cdfa0 "0") at map.c:350
      #1  0xfeefc01e in ApplyPlatformExtraTable (names=0x8041070, columns=0x8040ef0) at processes_select.c:1471
      #2  0xfeef9d21 in SelectProcess (procentry=0x80f67e0 "    root     0  0.0  0.0    0    0 ?       T   Nov_07       01:47 sched", pstime=1478614546, names=0x8041070, start=0x8041030, end=0x8040ff0, process_regex=0x8186360 "/bin/true", 
          a=..., attrselect=false) at processes_select.c:162
      #3  0xfeefa318 in SelectProcesses (process_name=0x8186360 "/bin/true", a=..., attrselect=false) at processes_select.c:316
      #4  0x08064aa7 in FindPidMatches (killlist=0x80416ec, a=..., promiser=0x8186360 "/bin/true") at verify_processes.c:332
      #5  0x08064377 in VerifyProcessOp (ctx=0x80a31e0, a=..., pp=0x819fa30) at verify_processes.c:142
      #6  0x08064302 in VerifyProcesses (ctx=0x80a31e0, a=..., pp=0x819fa30) at verify_processes.c:127
      #7  0x080640a8 in VerifyProcessesPromise (ctx=0x80a31e0, pp=0x819fa30) at verify_processes.c:55
      #8  0x0805350f in KeepAgentPromise (ctx=0x80a31e0, pp=0x819fa30, param=0x0) at cf-agent.c:1581
      #9  0xfeede0bf in ExpandPromiseAndDo (ctx=0x80a31e0, iterctx=0x81d0a18, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:215
      #10 0xfeede25e in ExpandPromise (ctx=0x80a31e0, pp=0x4, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:283
      #11 0x08052e98 in ScheduleAgentOperations (ctx=0x80a31e0, bp=0x80eda38) at cf-agent.c:1328
      #12 0x0806195c in VerifyMethod (ctx=0x80a31e0, call=..., a=..., pp=0x81cfcd0) at verify_methods.c:173
      #13 0x080615bc in VerifyMethodsPromise (ctx=0x80a31e0, pp=0x81cfcd0) at verify_methods.c:75
      #14 0x08053754 in KeepAgentPromise (ctx=0x80a31e0, pp=0x81cfcd0, param=0x0) at cf-agent.c:1638
      #15 0xfeede0bf in ExpandPromiseAndDo (ctx=0x80a31e0, iterctx=0x81434c8, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:215
      #16 0xfeede25e in ExpandPromise (ctx=0x80a31e0, pp=0x2, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:283
      #17 0x08052e98 in ScheduleAgentOperations (ctx=0x80a31e0, bp=0x8100d50) at cf-agent.c:1328
      #18 0x0806195c in VerifyMethod (ctx=0x80a31e0, call=..., a=..., pp=0x813a988) at verify_methods.c:173
      #19 0x080615bc in VerifyMethodsPromise (ctx=0x80a31e0, pp=0x813a988) at verify_methods.c:75
      #20 0x08053754 in KeepAgentPromise (ctx=0x80a31e0, pp=0x813a988, param=0x0) at cf-agent.c:1638
      #21 0xfeede0bf in ExpandPromiseAndDo (ctx=0x80a31e0, iterctx=0x81cb608, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:215
      #22 0xfeede25e in ExpandPromise (ctx=0x80a31e0, pp=0x2, act_on_promise=0x805339c <KeepAgentPromise>, param=0x0) at expand.c:283
      #23 0x08052e98 in ScheduleAgentOperations (ctx=0x80a31e0, bp=0x80ffc98) at cf-agent.c:1328
      #24 0x08052c41 in KeepPromiseBundles (ctx=0x80a31e0, policy=0x80d87f8, config=0x80a2778) at cf-agent.c:1242
      #25 0x08051b38 in KeepPromises (ctx=0x80a31e0, policy=0x80d87f8, config=0x80a2778) at cf-agent.c:723
      #26 0x08051073 in main (argc=6, argv=0x80472a4) at cf-agent.c:251
      

      Full backtrace attached.

      Let me know if you need more info!

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              a10038 jimis (Dimitrios Apostolou)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel