I am the OP of this question. Thank you all for your attention!
I just figured out the reason behind this unexpected behavior. It seems to be related to the Linux kernel configuration -- kernel.shm_rmid_forced
. When I changed it with the following command:
sudo sysctl -w kernel.shm_rmid_forced=0
everything started working as expected.
I hope this answer make sense to you!