# Enable advisory locks

**URL:** <https://forum.yugabyte.com/t/enable-advisory-locks/4584>\
**Category:** General\
**Created:** [August 13, 2025, 7:13pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584 "2025-08-13T19:13:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://forum.yugabyte.com/u/Dan)\
**Post date:** [August 13, 2025, 7:13pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/1 "2025-08-13T19:13:17Z")

</div>

Hi, I’m struggling to get advisory locks enabled and I can’t work out why.

I have set up a 3 nodes that I’m starting using the following Makefile

```auto
.PHONY: start

stop:
	yugabyted stop --base_dir /tmp/data1
	yugabyted stop --base_dir /tmp/data2
	yugabyted stop --base_dir /tmp/data3

start:
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data1 --advertise_address 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" 
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data2 --advertise_address 127.0.0.2 --join 127.0.0.1 --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data3 --advertise_address 127.0.0.3 --join 127.0.0.1 --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"

```

when run the make file the master keeps dying in a loop.

I feel like the master\_flags are not set correctly but I’m strugging to see whats wrong.

Can anyone offer any sugestions ?

Thanks

Dan

---

<div class="post-metadata">

**Author:** ![Basava\_Kolagani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/basava_kolagani/32/986_2.png) [@Basava\_Kolagani](https://forum.yugabyte.com/u/Basava_Kolagani)\
**Post date:** [August 13, 2025, 10:38pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/2 "2025-08-13T22:38:38Z")

</div>

Hello Dan,

You’ll need to set the flags on both master and the tserver. Also, you could check for error logs in files master.err/tserver.err and see if there’s something else going on.

---

<div class="post-metadata">

**Author:** ![Hari\_yb](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/hari_yb/32/813_2.png) [@Hari\_yb](https://forum.yugabyte.com/u/Hari_yb)\
**Post date:** [August 13, 2025, 10:50pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/3 "2025-08-13T22:50:09Z")

</div>

@Dan what version are you on? Advisory locks is available in 2025.1 and above.

Also like @Basava_Kolagani mentioned you need to set the flag on master and tserver on every node, since YugabyteD starts both master and tserver processes internally.

Can you try this?

`cat version_metadata.json`  
Make sure you are using a recent version.

`yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data1 --advertise_address 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"`

`yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data2 --advertise_address 127.0.0.2 --join 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" `

`yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data3 --advertise_address 127.0.0.3 --join 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"`

---

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://forum.yugabyte.com/u/Dan)\
**Post date:** [August 14, 2025, 6:32am UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/4 "2025-08-14T06:32:10Z")

</div>

@Hari_yb @Basava_Kolagani

Thanks - I appear to have it going.

FYI im using 2025.1.0.1-b3

somewhat embarasingly the root cause was that the M2 mac I was working on had the x86 version of yugabyte installed and was causing a segmentation fault when the tserver was starting.

I think i missed this because the UI was available so on the surface it looked ok.

I guess the mac was trying to run it under rosetta and not quite managing it.

I’ve updated the make file to include the changes from @Hari_yb and reinstalled yugabyte and now up and runing

thank you so much for your help.

Makefile included incase it’s usefull to anyone finding this thread later

```auto
.PHONY: start

stop:
	yugabyted stop --base_dir /tmp/data1
	yugabyted stop --base_dir /tmp/data2
	yugabyted stop --base_dir /tmp/data3

start:
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data1 --advertise_address 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data2 --advertise_address 127.0.0.2 --join 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"
	yugabyted start --cloud_location macbook.local.rack1 --base_dir /tmp/data3 --advertise_address 127.0.0.3 --join 127.0.0.1 --master_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true" --tserver_flags="allowed_preview_flags_csv={ysql_yb_enable_advisory_locks},ysql_yb_enable_advisory_locks=true"

```

---

<div class="post-metadata">

**Author:** ![Hari\_yb](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/hari_yb/32/813_2.png) [@Hari\_yb](https://forum.yugabyte.com/u/Hari_yb)\
**Post date:** [August 14, 2025, 4:20pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/5 "2025-08-14T16:20:18Z")

</div>

> [@Dan](#):
>
> somewhat embarasingly the root cause was that the M2 mac I was working on had the x86 version of yugabyte installed and was causing a segmentation fault when the tserver was starting.

Glad to see that you got it to work.

I have filed a GH to make it easier to detect and handle such errors:

> <https://github.com/yugabyte/yugabyte-db/issues/28282>
>
> Jira Link: \[DB-17966\](https://yugabyte.atlassian.net/browse/DB-17966)
> \### Descr…iption
> 
> When trying to start yugabyted with the wrong architecture version we should fail the startup with a more user friendly error.
> 
> https://forum.yugabyte.com/t/enable-advisory-locks/4584/4
> \> The root cause was that the M2 mac I was working on had the x86 version of yugabyte installed and was causing a segmentation fault when the tserver was starting.
> 
> \### Warning: Please confirm that this issue does not contain any sensitive information
> 
> \- \[x\] I confirm this issue does not contain any sensitive information.
> 
> \[DB-17966\]: https://yugabyte.atlassian.net/browse/DB-17966?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---

<div class="post-metadata">

**Author:** ![Raghavendra\_Thallam](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/raghavendra_thallam/32/749_2.png) [@Raghavendra\_Thallam](https://forum.yugabyte.com/u/Raghavendra_Thallam)\
**Post date:** [August 26, 2025, 3:58pm UTC](https://forum.yugabyte.com/t/enable-advisory-locks/4584/6 "2025-08-26T15:58:35Z")

</div>

@Dan , In 2025.1 version, Advisory locks is generally available and on by default, You no longer need to set the gflag - ysql\_yb\_enable\_advisory\_locks explicitly.
