Skip to content

Commit ff734b6

Browse files
committed
do not try to pull NULL bulks
1 parent ae57337 commit ff734b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/unifyfs_p2p_rpc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,7 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
941941
clock_gettime(CLOCK_REALTIME, &timeout);
942942
timeout.tv_sec += 5;
943943
ABT_mutex_lock(preq->pending_sync);
944+
LOGDBG("waiting on pending get_extents condition for preq(%p)", preq);
944945
rc = ABT_cond_timedwait(preq->pending_cond, preq->pending_sync,
945946
&timeout);
946947
if (ABT_ERR_COND_TIMEDOUT == rc) {
@@ -949,6 +950,9 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
949950
} else if (rc) {
950951
LOGERR("failed to wait on condition (err=%d)", rc);
951952
ret = UNIFYFS_ERROR_MARGO;
953+
} else {
954+
LOGDBG("pending get_extents condition for preq(%p) was signaled",
955+
preq);
952956
}
953957
ABT_mutex_unlock(preq->pending_sync);
954958
return ret;
@@ -981,7 +985,7 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
981985
if (ret == UNIFYFS_SUCCESS) {
982986
/* get number of extents */
983987
unsigned int n_ext = (unsigned int) out->num_extents;
984-
if (n_ext > 0) {
988+
if ((n_ext > 0) && (out->extents != HG_BULK_NULL)) {
985989
/* get bulk buffer with extent locations */
986990
size_t buf_sz = (size_t)n_ext * sizeof(extent_metadata);
987991
void* buf = pull_margo_bulk(preq->req_state->handle,

0 commit comments

Comments
 (0)