Citus does not build cleanly or work on 32-bit machines
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Here are the warnings during compilation:
```
commands/multi_copy.c: In function ‘RemoteFinalizedShardPlacementList’:
commands/multi_copy.c:1131:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘uint64’ [-Wformat=]
appendStringInfo(shardPlacementsCommand, FINALIZED_SHARD_PLACEMENTS_QUERY, shardId);
^
commands/multi_copy.c: In function ‘SendCopyDataToPlacement’:
commands/multi_copy.c:1251:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(ERROR, (errcode(ERRCODE_IO_ERROR),
^
commands/multi_copy.c: In function ‘EndRemoteCopy’:
commands/multi_copy.c:1294:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(ERROR, (errcode(ERRCODE_IO_ERROR),
^
commands/multi_copy.c: In function ‘RemoteUpdateShardStatistics’:
commands/multi_copy.c:1687:7: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘uint64’ [-Wformat=]
shardId);
^
executor/multi_task_tracker_executor.c: In function ‘TaskHashEnter’:
executor/multi_task_tracker_executor.c:569:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘uint64’ [-Wformat=]
ereport(ERROR, (errmsg("multiple entries for task: \"%d:%ld:%d\"",
^
metadata/metadata_sync.c: In function ‘DistributionCreateCommand’:
metadata/metadata_sync.c:231:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64’ [-Wformat=]
replicationModel);
^
metadata/metadata_sync.c: In function ‘ShardListInsertCommand’:
metadata/metadata_sync.c:327:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64’ [-Wformat=]
placement->placementId);
^
metadata/metadata_sync.c:327:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64’ [-Wformat=]
metadata/metadata_sync.c:327:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64’ [-Wformat=]
metadata/metadata_sync.c:364:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64’ [-Wformat=]
maxHashToken);
^
transaction/commit_protocol.c: In function ‘PrepareRemoteTransactions’:
transaction/commit_protocol.c:80:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(DEBUG2, (errmsg("sent PREPARE TRANSACTION over connection %ld",
^
transaction/commit_protocol.c: In function ‘AbortRemoteTransactions’:
transaction/commit_protocol.c:127:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(DEBUG2, (errmsg("sent ROLLBACK over connection %ld", connectionId)));
^
transaction/commit_protocol.c: In function ‘CommitRemoteTransactions’:
transaction/commit_protocol.c:201:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(DEBUG2, (errmsg("sent COMMIT PREPARED over connection %ld",
^
transaction/commit_protocol.c:231:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int64’ [-Wformat=]
ereport(DEBUG2, (errmsg("sent COMMIT over connection %ld", connectionId)));
^
transaction/multi_shard_transaction.c: In function ‘BeginTransactionOnShardPlacements’:
transaction/multi_shard_transaction.c:145:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64’ [-Wformat=]
ereport(ERROR, (errmsg("could not establish a connection to all "
^
```
I fixed some crashes in https://github.com/citusdata/citus/pull/869/commits/6f4e53a5c3fbe1e3ea40475d55ba6fe5746a1af0 but there still exist numerous test failures and more crashes when running on 32-bit, the next blocker (after applying that commit) is this one:
```
*** /home/ubuntu/citus/src/test/regress/expected/multi_basic_queries.out 2016-10-20 08:16:18.283704672 +0000
--- /home/ubuntu/citus/src/test/regress/results/multi_basic_queries.out 2016-10-20 08:19:32.987704672 +0000
***************
*** 5,31 ****
-- Execute simple sum, average, and count queries on data recently uploaded to
-- our partitioned table.
SELECT count(*) FROM lineitem;
! count
! -------
! 12000
! (1 row)
!
! SELECT sum(l_extendedprice) FROM lineitem;
! sum
! --------------
! 457702024.50
! (1 row)
!
! SELECT avg(l_extendedprice) FROM lineitem;
! avg
! --------------------
! 38141.835375000000
! (1 row)
!
! -- Verify temp tables which are used for final result aggregation don't persist.
! SELECT count(*) FROM pg_class WHERE relname LIKE 'pg_merge_job_%' AND relkind = 'r';
! count
! -------
! 0
! (1 row)
!
--- 5,11 ----
-- Execute simple sum, average, and count queries on data recently uploaded to
-- our partitioned table.
SELECT count(*) FROM lineitem;
! server closed the connection unexpectedly
! This probably means the server terminated abnormally
! before or while processing the request.
! connection to server was lost
```
Here is a gist with the entire `regression.diffs`: https://gist.github.com/anonymous/3d7d0916b5ede0d252b08fdb2064c92e
Contributor guide
Assessment
This issue has not been assessed yet.