{"action":"closed","issue":{"url":"https://api.github.com/repos/performancecopilot/parfait/issues/19","labels_url":"https://api.github.com/repos/performancecopilot/parfait/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/performancecopilot/parfait/issues/19/comments","events_url":"https://api.github.com/repos/performancecopilot/parfait/issues/19/events","html_url":"https://github.com/performancecopilot/parfait/issues/19","id":113593032,"number":19,"title":"Integration with PCP","user":{"login":"ruslan-simonenko","id":4956403,"avatar_url":"https://avatars.githubusercontent.com/u/4956403?v=3","gravatar_id":"","url":"https://api.github.com/users/ruslan-simonenko","html_url":"https://github.com/ruslan-simonenko","followers_url":"https://api.github.com/users/ruslan-simonenko/followers","following_url":"https://api.github.com/users/ruslan-simonenko/following{/other_user}","gists_url":"https://api.github.com/users/ruslan-simonenko/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslan-simonenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslan-simonenko/subscriptions","organizations_url":"https://api.github.com/users/ruslan-simonenko/orgs","repos_url":"https://api.github.com/users/ruslan-simonenko/repos","events_url":"https://api.github.com/users/ruslan-simonenko/events{/privacy}","received_events_url":"https://api.github.com/users/ruslan-simonenko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-27T14:17:39Z","updated_at":"2015-10-27T21:08:39Z","closed_at":"2015-10-27T21:08:39Z","body":"I am trying to integrate Parfait with PCP, using the code based on PcpMonitorBridgeIntegrationTest.java.\r\nHere is the .mmv producing code:\r\n```java    \r\npublic static void main(String[] args) throws InterruptedException, IOException {\r\n    final FileByteBufferFactory bufferFactory = new FileByteBufferFactory(new File(\"/tmp/filebuff.mmv\"));\r\n    final PcpWriter writer = new PcpMmvWriter(bufferFactory, IdentifierSourceSet.DEFAULT_SET);\r\n    final PcpMonitorBridge pcpMonitorBridge = new PcpMonitorBridge(writer);\r\n    final MonitorableRegistry registry = new MonitorableRegistry();\r\n    final DynamicMonitoringView dynamicallyModifiedView = new DynamicMonitoringView(registry, pcpMonitorBridge, 1000);\r\n\r\n    final DummyMonitorable monitorable = new DummyMonitorable(\"simplestudy.testmetric\");\r\n    registry.register(monitorable);\r\n\r\n    dynamicallyModifiedView.start();\r\n    Thread.sleep(5000);\r\n    dynamicallyModifiedView.stop();\r\n}\r\n\r\nprivate static class DummyMonitorable extends AbstractMonitorable<String> {\r\n    protected DummyMonitorable(String name) {\r\n        super(name, \"Description of \" + name, String.class, Unit.ONE, ValueSemantics.CONSTANT);\r\n    }\r\n\r\n    @Override\r\n    public String get() {\r\n        return \"This is just a test\";\r\n    }\r\n}\r\n```\r\n\r\nMy .mmv file is accepted by mmv, but during the processing something goes wrong. The only unusual thing that I see in logs is: \r\n```\r\n__pmUnpinPDUBuf(0x25372d0) -> fails\r\n```\r\nHowever it doesn't give me any clue on how to fix it. Any help would be greatly appreciated!\r\n\r\nHere is the mmv.log (recording started right before mmv.reload set):\r\n```\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 28, last read 28, still need 0\r\n[18091]pmGetPDU: PMNS_NAMES fd=0 len=40 from=2\r\n000:       28     700e        2  b000000        0  1000000  a000000 2e766d6d \r\n008: 6f6c6572 7e7e6461 \r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: Received PDU_PMNS_NAMES\r\n__pmDecodeNameList\r\nnamelist dump: numnames = 1\r\n  name[0]: \"mmv.reload\"\r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: MMV: pmdammv: reloading\r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: MMV: create_client_stat: filebuff.mmv, /var/lib/pcp/tmp/mmv/filebuff.mmv\r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: pmdaRehash: PMDA pmdammv: successful rebuild\r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: MMV: pmdammv: 2 metrics and 0 indoms after reload\r\n__pmSendIDList\r\nIDlist dump: numids = 1\r\n  PMID[0]: 0x11800000 70.0.0\r\n__pmFindPDUBuf(24) -> 0x25372b0\r\n   pinned pdubuf[size](pincnt): 0x25372b0...0x25372c7[24](1) 0x2537880...0x2537c7f[1024](1)\r\n[18091]pmXmitPDU: PMNS_IDS fd=1 len=24\r\n000:       18     700d        0        0  1000000     8011 \r\n__pmUnpinPDUBuf(0x25372b0) -> pdubuf=0x25372b0, pincnt=0\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 4, last read 4, still need 0\r\n[18091]pmGetPDU: DESC_REQ fd=0 len=16 from=2\r\n000:       10     7004        2     8011 \r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: Received PDU_DESC_REQ\r\n__pmFindPDUBuf(32) -> 0x2537310\r\n   pinned pdubuf[size](pincnt): 0x2537310...0x253732f[32](1) 0x2537880...0x2537c7f[1024](1)\r\n[18091]pmXmitPDU: DESC fd=1 len=32\r\n000:       20     7005        0     8011        0 ffffffff  3000000        0 \r\n__pmUnpinPDUBuf(0x2537310) -> pdubuf=0x2537310, pincnt=0\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 16, last read 16, still need 0\r\n[18091]pmGetPDU: PROFILE fd=0 len=28 from=2\r\n000:       1c     7002        2        0        0        0        0 \r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: Received PDU_PROFILE\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 20, last read 20, still need 0\r\n[18091]pmGetPDU: FETCH fd=0 len=32 from=2\r\n000:       20     7003        2        0        0        0  1000000     8011 \r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: Received PDU_FETCH\r\n__pmPinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=2\r\n__pmUnpinPDUBuf(0x253789c) -> pdubuf=0x2537880, pincnt=1\r\npmResult dump from 0x25365b0 timestamp: 0.000000 00:00:00.000 numpmid: 1\r\n  70.0.0 (<noname>): numval: 1 valfmt: 0 vlist[]:\r\n   value 0 0 0x0\r\n__pmFindPDUBuf(48) -> 0x2537310\r\n   pinned pdubuf[size](pincnt): 0x2537310...0x253733f[48](1) 0x2537880...0x2537c7f[1024](1)\r\n[18091]pmXmitPDU: RESULT fd=1 len=44\r\n000:       2c     7001        0        0        0  1000000     8011  1000000 \r\n008:        0 ffffffff        0 \r\n__pmUnpinPDUBuf(0x2537310) -> pdubuf=0x2537310, pincnt=0\r\n__pmFreeResultValues(0x25365b0) numpmid=1\r\n__pmUnpinPDUBuf(0x25372a0) -> fails\r\n   pinned pdubuf[size](pincnt): 0x2537880...0x2537c7f[1024](1)\r\nfree(0x25372a0) vset pmid=70.0.0\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 32, last read 32, still need 0\r\n[18091]pmGetPDU: RESULT fd=0 len=44 from=2\r\n000:       2c     7001        2 f8fe1a95 9087fd96  1000000     8011  1000000 \r\n008:        0 ffffffff  1000000 \r\npmgetconfig: PCP_TMPFILE_DIR=/var/tmp\r\n[Tue Oct 27 14:13:53] pmdammv(18091) Debug: Received PDU_RESULT\r\nvlist[0] pmid: 70.0.0 numval: 1 valfmt: insitu\r\nneed: 32 vsize: 20 nvsize: 32 vbsize: 0 offset: 44 hdr.len: 44 pduend: 0x25378ac vsplit: 0x25378ac (diff 0) pdubuf: 0x2537880 (diff 44)\r\n__pmFindPDUBuf(32) -> 0x2537310\r\n   pinned pdubuf[size](pincnt): 0x2537310...0x253732f[32](1) 0x2537880...0x2537c7f[1024](1)\r\nnew vlist[0] pmid: 70.0.0 numval: 1 valfmt: insitu value: 1\r\npmResult dump from 0x25372a0 timestamp: -1793392904.-1761769584 09:46:32.2533197 numpmid: 1\r\n  70.0.0 (<noname>): numval: 1 valfmt: 0 vlist[]:\r\n   value 1 1.4012985e-45 0x1\r\npmExtractValue:  1 [32] -> 1 [32]\r\n__pmFindPDUBuf(16) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537310...0x253732f[32](1) 0x2537460...0x253746f[16](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmSendError: sending error PDU (code=0, toversion=2)\r\n[18091]pmXmitPDU: ERROR fd=1 len=16\r\n000:       10     7000        0        0 \r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npmFreeResult(0x25372a0)\r\n__pmFreeResultValues(0x25372a0) numpmid=1\r\n__pmUnpinPDUBuf(0x2537310) -> pdubuf=0x2537310, pincnt=0\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\npduread(0, ...): have 12, last read 12, still need 0\r\n__pmFindPDUBuf(1024) -> 0x2537880\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1) 0x2537880...0x2537c7f[1024](1)\r\n__pmUnpinPDUBuf(0x2537460) -> pdubuf=0x2537460, pincnt=0\r\npduread(0, ...): have 4, last read 4, still need 0\r\n[18091]pmGetPDU: ERROR fd=0 len=16 from=2\r\n000:       10     7000        2 99cfffff \r\n__pmDecodeError: got error PDU (code=-12391, fromversion=2)\r\n__pmUnpinPDUBuf(0x2537880) -> pdubuf=0x2537880, pincnt=0\r\n__pmFindPDUBuf(1024) -> 0x2537460\r\n   pinned pdubuf[size](pincnt): 0x2537460...0x253785f[1024](1)\r\n```\r\n\r\n\r\n\r\n\r\n"}}