Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call group_free in server code #59

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

mrbojangles3
Copy link
Contributor

Valgrind reports this loss on the server side code:

==86816== 4,816 (120 direct, 4,696 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 5
==86816==    at 0x484A464: calloc (vg_replace_malloc.c:1328)
==86816==    by 0x406705: rx_group_t (handshake.c:130)
==86816==    by 0x406705: slave_handshake (handshake.c:497)
==86816==    by 0x404F29: slave_init (slave.c:237)
==86816==    by 0x404F29: slave_master.isra.0 (slave.c:289)
==86816==    by 0x405741: slave (slave.c:459)
==86816==    by 0x402A8F: main (main.c:380)

Adding the call to group_free solves this leak.
for reference this is the xml file used on the client side:

<profile name="server_group_free.xml">
  <group nthreads="128">
        <transaction iterations="1">
            <flowop type="connect" options="remotehost=%host protocol=tcp"/>
        </transaction>
        <transaction duration="10s">
            <flowop type="write" options="size=64"/>
            <flowop type="read" options="size=1072 "/>
        </transaction>
        <transaction >
            <flowop type="disconnect" />
        </transaction>
  </group>
  <group nthreads="64">
        <transaction iterations="1">
            <flowop type="connect" options="remotehost=$host protocol=tcp"/>
        </transaction>
        <transaction duration="10s">
            <flowop type="write" options="size=64"/>
            <flowop type="read" options="size=1072 "/>
        </transaction>
        <transaction >
            <flowop type="disconnect" />
        </transaction>
  </group>

</profile>

Copy link
Collaborator

@realneel realneel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@realneel realneel merged commit 0536b0b into uperf:master Mar 1, 2023
@mrbojangles3 mrbojangles3 deleted the free_worklist_server branch March 1, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants