You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/01/27 16:41:53 UTC

[GitHub] [incubator-kvrocks] PragmaTwice opened a new pull request, #1233: Make docker image more portable

PragmaTwice opened a new pull request, #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233

   It is a known issue that some users encountered "illegal instruction" crash while using our docker images, see #1146.
   
   After investigation, RocksDB use `march=native` while the `PORTABLE` option is set to OFF.
   
   We keep the default behavior for best performance, but use `PORTABLE=ON` in docker images to prevent illegal instructions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#discussion_r1089576809


##########
Dockerfile:
##########
@@ -26,7 +26,7 @@ RUN apt install -y git gcc g++ make cmake autoconf automake libtool python3 libs
 WORKDIR /kvrocks
 
 COPY . .
-RUN ./x.py build -DENABLE_OPENSSL=ON
+RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON

Review Comment:
   For example, if the build machine (Travis CI here) has avx512 instructions, the built binary will use these instructions to perform vectorize optimization if `-march=native` is ON. But maybe user's device does not support avx512.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] torwig commented on a diff in pull request #1233: Make docker image more portable

Posted by "torwig (via GitHub)" <gi...@apache.org>.
torwig commented on code in PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#discussion_r1089293228


##########
Dockerfile:
##########
@@ -26,7 +26,7 @@ RUN apt install -y git gcc g++ make cmake autoconf automake libtool python3 libs
 WORKDIR /kvrocks
 
 COPY . .
-RUN ./x.py build -DENABLE_OPENSSL=ON
+RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON

Review Comment:
   Why portable is ON if the binary is built inside Ubuntu and is launching inside Ubuntu?
   I guess arch-specific optimizations could be applied in this case because we are fully aware of the target platform (Ubuntu). Correct me if I'm wrong.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#issuecomment-1407271124

   Thanks all. Merging...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice merged pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice merged PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#issuecomment-1407266784

   > For confirmation, will MORE_BUILD_ARGS override ENABLE_OPENSSL and PORTABLE if specified?
   
   Yeah.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#discussion_r1089599806


##########
Dockerfile:
##########
@@ -26,7 +26,7 @@ RUN apt install -y git gcc g++ make cmake autoconf automake libtool python3 libs
 WORKDIR /kvrocks
 
 COPY . .
-RUN ./x.py build -DENABLE_OPENSSL=ON
+RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON

Review Comment:
   done. since other build arguments can also have this problem like ENABLE_SSL, DISABLE_JEMALLOC, so I add $MORE_BUILD_ARGS instead of $PORTABLE for more general purpose.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1233: Make docker image more portable

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#discussion_r1089576809


##########
Dockerfile:
##########
@@ -26,7 +26,7 @@ RUN apt install -y git gcc g++ make cmake autoconf automake libtool python3 libs
 WORKDIR /kvrocks
 
 COPY . .
-RUN ./x.py build -DENABLE_OPENSSL=ON
+RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON

Review Comment:
   For example, if the build machine (Travis CI here) has avx512 instructions, the built binary will use these instructions to perform vectorize optimization. But maybe user's device does not support avx512.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on a diff in pull request #1233: Make docker image more portable

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #1233:
URL: https://github.com/apache/incubator-kvrocks/pull/1233#discussion_r1089577635


##########
Dockerfile:
##########
@@ -26,7 +26,7 @@ RUN apt install -y git gcc g++ make cmake autoconf automake libtool python3 libs
 WORKDIR /kvrocks
 
 COPY . .
-RUN ./x.py build -DENABLE_OPENSSL=ON
+RUN ./x.py build -DENABLE_OPENSSL=ON -DPORTABLE=ON

Review Comment:
   I'd suggest adding an `ARG` and defaulting to `ON`.
   
   Our image can always use the default but if users are certain for the platform they can build their own with `PORTABLE=OFF`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org