XGBoost Error: must have exactly ngroup * nrow gpairs

I keep getting this error for a tabular dataset. The data is around 15M records. Size is not an issue as I have got XGboost to run for bigger datasets. Seeing this error for the first time. What could be the issue. Appreciate any help.

Traceback (most recent call last):
File “train.py”, line 322, in
main()
File “train.py”, line 288, in main
num_boost_round=args.num_round)
File “/usr/local/lib/python3.7/site-packages/xgboost/training.py”, line 197, in train
early_stopping_rounds=early_stopping_rounds)
File “/usr/local/lib/python3.7/site-packages/xgboost/training.py”, line 81, in _train_internal
bst.update(dtrain, i, obj)
File “/usr/local/lib/python3.7/site-packages/xgboost/core.py”, line 1502, in update
self.boost(dtrain, grad, hess)
File “/usr/local/lib/python3.7/site-packages/xgboost/core.py”, line 1530, in boost
c_bst_ulong(len(grad))))
File “/usr/local/lib/python3.7/site-packages/xgboost/core.py”, line 210, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [13:58:08] …/src/gbm/gbtree.cc:212: Check failed: in_gpair->Size() % ngroup == 0U (1 vs. 0) : must have exactly ngroup * nrow gpairs
Stack trace:
[bt] (0) /usr/local/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x912df) [0x7f8a0947c2df]
[bt] (1) /usr/local/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x18e84c) [0x7f8a0957984c]
[bt] (2) /usr/local/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(+0x1c6f2b) [0x7f8a095b1f2b]
[bt] (3) /usr/local/lib/python3.7/site-packages/xgboost/lib/libxgboost.so(XGBoosterBoostOneIter+0x18f) [0x7f8a0946c1af]
[bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7f8a7f9fd8ee]
[bt] (5) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x22f) [0x7f8a7f9fd2bf]
[bt] (6) /usr/local/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0xd563) [0x7f8a7fa0e563]
[bt] (7) /usr/local/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x12ac3) [0x7f8a7fa13ac3]
[bt] (8) /usr/local/lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0x97) [0x7f8a83b6f137]