{"action":"closed","issue":{"url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/465","repository_url":"https://api.github.com/repos/hioa-cs/IncludeOS","labels_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/465/labels{/name}","comments_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/465/comments","events_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/465/events","html_url":"https://github.com/hioa-cs/IncludeOS/issues/465","id":145225680,"number":465,"title":"BufferStore: Buffers are not released..?","user":{"login":"AndreasAakesson","id":6329266,"avatar_url":"https://avatars.githubusercontent.com/u/6329266?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasAakesson","html_url":"https://github.com/AndreasAakesson","followers_url":"https://api.github.com/users/AndreasAakesson/followers","following_url":"https://api.github.com/users/AndreasAakesson/following{/other_user}","gists_url":"https://api.github.com/users/AndreasAakesson/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasAakesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasAakesson/subscriptions","organizations_url":"https://api.github.com/users/AndreasAakesson/orgs","repos_url":"https://api.github.com/users/AndreasAakesson/repos","events_url":"https://api.github.com/users/AndreasAakesson/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasAakesson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-01T16:35:15Z","updated_at":"2016-04-03T20:09:26Z","closed_at":"2016-04-03T20:09:26Z","body":"Something is wrong with the release of buffers.\r\n\r\n**TCP Test**\r\n```\r\n   [ Buf avail ] 562\r\n                [x] inet->buffers_available() < buffers_available\r\n                [x] conn.read() == small\r\n  [ Buf avail ] 560\r\n                + Enabling IRQ 0, mask: 0xfbfa\r\n[ IRQ manager ] Updated subscriptions: 0x401 irq: 0\r\n       [ TEST ] BIG string (6000)\r\n  [ Buf avail ] 556\r\n                [x] conn.read() == big\r\n  [ Buf avail ] 546\r\n       [ TEST ] HUGE string (60000)\r\n  [ Buf avail ] 542\r\n                [x] conn.read() == huge\r\n  [ Buf avail ] 457\r\n       [ TEST ] Connection\r\n                [x] tcp.activeConnections() > 0\r\n                [x] conn.is_connected()\r\n                [x] conn.is_writable()\r\n                [x] conn.is_state(ESTABLISHED)\r\n       [ TEST ] Active close\r\n                [x] !conn->is_writable()\r\n                [x] conn.is_state(FIN-WAIT-1)\r\n                [x] conn.is_state(FIN-WAIT-2)\r\n                [x] conn.is_state(TIME-WAIT)\r\n       [ TEST ] Outgoing Connection (10.0.2.2:8085)\r\n                [x] conn->read() == small\r\n                [x] Connection closed by server\r\n       [ TEST ] Outgoing Internet Connection (india.colorado.edu:13)\r\n                [x] Resolved host\r\n                [x] Connected\r\n                [x] Received data\r\n       [ TEST ] Started 3 x MSL timeout.\r\n       [ TEST ] Verify release of resources\r\n                [x] tcp.activeConnections() == 0\r\n                [ ] inet->buffers_available() == buffers_available\r\n[ Buffers available ] 440\r\n# TEST DONE #\r\n```\r\n\r\n**UDP Test**\r\n```\r\nBuffers available: 566\r\nUDP server listening to port 4242 \r\n================================================================================\r\n IncludeOS v0.8.0-rc.1-127-g11a8d54-dirty\r\n +--> Running [ IncludeOS UDP test ]\r\n<Packet> CONSTRUCT packet, buf @ 0x2f200a\r\n     [ DHCPv4 ] IP ADDRESS:     10.0.2.15\r\n     [ DHCPv4 ] SUBNET MASK:     255.255.255.0\r\n     [ DHCPv4 ] LEASE TIME:     35879872 mins\r\n     [ DHCPv4 ] GATEWAY:     10.0.2.2\r\n     [ DHCPv4 ] DNS SERVER:     192.168.1.1\r\n<Packet> CONSTRUCT packet, buf @ 0x3218f0\r\n<Packet> DESTRUCT packet, buf @ 0x3218f0\r\n<Packet> DESTRUCT packet, buf @ 0x2f200a\r\n<Packet> CONSTRUCT packet, buf @ 0x2f25f0\r\n     [ DHCPv4 ] Server acknowledged our request!\r\n      [ Inet4 ] Reconfiguring network. New IP: 10.0.2.15\r\n[ DHCPv4::On_config ] Config complete\r\n<Packet> DESTRUCT packet, buf @ 0x2f25f0\r\n<Packet> CONSTRUCT packet, buf @ 0x2f2bd6\r\nGetting UDP data from 10.0.2.2: 49733: Release my buffers already !!!!!!\r\n\r\nBuffers available: 564\r\n<Packet> CONSTRUCT packet, buf @ 0x322aa2\r\n<Packet> CONSTRUCT packet, buf @ 0x323088\r\n<Packet> DESTRUCT packet, buf @ 0x323088\r\nBuffers available: 563\r\n                + Enabling IRQ 0, mask: 0xfbfa\r\n[ IRQ manager ] Updated subscriptions: 0x401 irq: 0\r\n<Packet> DESTRUCT packet, buf @ 0x2f2bd6\r\n<Packet> CONSTRUCT packet, buf @ 0x2f31bc\r\n<Packet> DESTRUCT packet, buf @ 0x322aa2\r\n<Packet> DESTRUCT packet, buf @ 0x2f31bc\r\nBuffers available (1s delay): 562\r\n```\r\n\r\n**Every constructed packet is being destructed**\r\n```\r\n// formatted log from a TCP test\r\n<Packet> CONSTRUCT packet, buf @ 0x311bd6    <Packet> DESTRUCT packet, buf @ 0x311bd6\r\n<Packet> CONSTRUCT packet, buf @ 0x3121bc    <Packet> DESTRUCT packet, buf @ 0x3121bc\r\n<Packet> CONSTRUCT packet, buf @ 0x3127a2    <Packet> DESTRUCT packet, buf @ 0x3127a2\r\n<Packet> CONSTRUCT packet, buf @ 0x312d88    <Packet> DESTRUCT packet, buf @ 0x312d88\r\n<Packet> CONSTRUCT packet, buf @ 0x31336e    <Packet> DESTRUCT packet, buf @ 0x31336e\r\n<Packet> CONSTRUCT packet, buf @ 0x313954    <Packet> DESTRUCT packet, buf @ 0x313954\r\n<Packet> CONSTRUCT packet, buf @ 0x313f3a    <Packet> DESTRUCT packet, buf @ 0x313f3a\r\n<Packet> CONSTRUCT packet, buf @ 0x341aa2    <Packet> DESTRUCT packet, buf @ 0x341aa2\r\n<Packet> CONSTRUCT packet, buf @ 0x342088    <Packet> DESTRUCT packet, buf @ 0x342088\r\n<Packet> CONSTRUCT packet, buf @ 0x34323a    <Packet> DESTRUCT packet, buf @ 0x34323a\r\n<Packet> CONSTRUCT packet, buf @ 0x3443ec    <Packet> DESTRUCT packet, buf @ 0x3443ec\r\n<Packet> CONSTRUCT packet, buf @ 0x3449d2    <Packet> DESTRUCT packet, buf @ 0x3449d2\r\n<Packet> CONSTRUCT packet, buf @ 0x345b84    <Packet> DESTRUCT packet, buf @ 0x345b84\r\n```\r\n\r\n**Some other output from TCP test**\r\n```\r\n       [ TEST ] HUGE string (60000)\r\n<BufferStore::release_offset_buffer> Releasing 0x352410. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x3529f6. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x352fdc. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x3535c2. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x353ba8. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x35418e. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x354774. 541 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x354d5a. 541 available buffers.\r\n...\r\n// Incoming data can be a reason why the available buffers are decreasing.\r\n  [ Buf avail ] 541\r\n<BufferStore::release_offset_buffer> Releasing 0x362d7e. 539 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x36394a. 538 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x364afc. 536 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x36d2a6. 514 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x374e84. 494 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x375a50. 493 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x37661c. 492 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x3771e8. 491 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x377db4. 490 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x378980. 489 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x37954c. 488 available buffers.\r\n<BufferStore::release_offset_buffer> Releasing 0x37a118. 487 available buffers.\r\n```\r\n\r\n"}}