SJTU-IPADS / ServerlessBench

A benchmark suite for serverless computing
Other
216 stars 32 forks source link

[TestCase4] Problem with Source Code of Image-Processing functions. #19

Closed adhinneupane closed 2 years ago

adhinneupane commented 2 years ago

Hi, The image used to execute the Testcase4/ functions is dplsming/java8action-imagemagic

The functions cannot run in the this container with the following error

Cannot pull dplsming/java8action-imagemagic container doesn't exist 

I tried to execute it in a different container with java8action and imagemagic installed but there seems to be other factors included in the missing docker image on which the function execution relies.

with barebone java8action-imagemagic, docker image

 Generates NullPointerException

Could you please check your docker hub account and add the aforementioned image? Would appreciate other suggested workarounds for the same as well.

adhinneupane commented 2 years ago

@CodingYuanLiu

adhinneupane commented 2 years ago

@Ddnirvana

CodingYuanLiu commented 2 years ago

Thanks for your question. Try it now please.

adhinneupane commented 2 years ago

Hi @CodingYuanLiu , thank you for taking time to reply. I still do not see the docker container under your dplsming/ dockerhub profile. Can you please check whether you have made it public or let us know the dependencies that have been installed in that image.

CodingYuanLiu commented 2 years ago

Sorry, but I can pull dplsming/java8action-imagemagic successfully.

adhinneupane commented 2 years ago

@CodingYuanLiu Thanks for making the container public. I was able to run it. I am still getting issues with execution of some functions with this message in openwhisk logs. could this be a issue with the source code of the functions? I am using the container dplsming/java8action-imagemagic for execution.

image

CodingYuanLiu commented 2 years ago

Thank you for your reply. The error could happen because of any reason. For example, you may write a wrong couchdb ip/port in local.env. You may access the error logs and find the reason.

adhinneupane commented 2 years ago

I understand that it could be a configuration issue with my setup. I have double checked it to ensure that it is able to connect to all its dependencies. Also attaching a screenshot for successful deployment of functions for imageprocessing

image

As the benchmark is able to upload images and functions to openwhisk, couchdb, the only problem I am having is when the functions have to be invoked by themselves.

I am running openwhisk in standalone mode with standalone Boot Run:

image

Do i need to setup openwhisk with specific configs of couchdb and not in the standalone mode?

.

adhinneupane commented 2 years ago

@CodingYuanLiu

I enabled openwhisk with customconfigs for couchdb connections. That too doesn't seem to work.

This is the error from openwhisk logs and function invocations respectively.

image image

CodingYuanLiu commented 2 years ago

Thanks for your reply. I can use openwhisk-docker-compose and openwhisk with kubernetes to run the benchmark successfully. In these cases, couchdb is naturally configured and deployed by docker-compose or kubernetes. Your information is not enough for me to identify the error. Maybe using wsk logs <activation-id> could help you.

adhinneupane commented 2 years ago

HI @CodingYuanLiu Although I should have said this probably earlier but the issue I am having is with With TestCase4 - imageprocessing workload (even the other workloads online compiling , e.t.c work fine)

After checking my local.env and making sure all dependency endpoints/ports/resources are available, I tried to rerun it with the same error Java NULL Pointer exception.

I went a bit deeper and checked the wsk logs which show that only some functions transformImageData and imageProcessSequence do not run with error: Developer error as seen in wsk logs.

image

I checked docker containers to see if all of them have started too to ensure that no request times out. I made sure the config (wsk, local.env) is correct (thus the uploads and deploy.sh, invocations is successfull)

I also switched to a higher Computer machine to ensure openwhisks own docker containers have plenty of resource capacity to not delay any requests.

Can you help me check whether this image processing workload benchmark is working?

CodingYuanLiu commented 2 years ago

Could you provide some information from wsk activation logs <id> to see what happened to cause the error? I have no idea how you config your openwhisk and how your local.env is written, and where does the Null pointer exception come from specifically in the code. I guess maybe your extractImageMetadata fail to access the couchdb so that the transformMetadata can not get the corresponding argument from extractImageMetadata's output.

adhinneupane commented 2 years ago

Hi @CodingYuanLiu

Here are the wsk logs image

Here is the local.env (this should not be incorrect - else the functions /database deployments) would not be successfull for deploy.sh. Still posting it if helps debug this issue.

# Openwhisk
OPENWHISK_APIHOST=172.17.0.1
OPENWHISK_APIPORT=3232
OPENWHISK_TOKEN='N/A'

# CouchDB
COUCHDB_IP=127.0.0.1
COUCHDB_PORT=5984
COUCHDB_USERNAME="admin"
COUCHDB_PASSWORD="mypassword"

# image-processing
IMAGE_DATABASE="images"
IMAGE_DATABASE_LOG="image-logs"

# alexax
# smarthome parameters
ALEXA_SMARTHOME_IP=
ALEXA_SMARTHOME_PORT_DOOR=1000
ALEXA_SMARTHOME_PORT_LIGHT=1001
ALEXA_SMARTHOME_PORT_TV=1002
ALEXA_SMARTHOME_PORT_AIR_CONDITIONING=1003
ALEXA_SMARTHOME_PORT_PLUG=1004
ALEXA_SMARTHOME_PASSWORD="Taylor Swift"
# reminder parameters
ALEXA_REMINDER_COUCHDB_DATABASE="reminder"

# online-compiling
GG_MODELPATH=
GG_STORAGE_URI=

# data-analysis
WAGE_COUCHDB_INSTANCE="openwhisk-couchdb"
WAGE_COUCHDB_DATABASE="wage"
WAGE_COUCHDB_DATABASE_STATISTICS="wage-statistics"

# data analysis couchdb package provider
COUCHDB_PROVIDER_PORT=5984
COUCHDB_PROVIDER_PROTOCOL=chttpd
COUCHDB_PROVIDER_DB_PREFIX=prefixforvirtualhost
COUCHDB_PROVIDER_ROUTER_HOST=127.0.0.2
COUCHDB_PROVIDER_DATABASE_TRIGGER=couchdbtrigger

As for the Null pointer exception, it can be only generated from the source file of these functions.

I had hoped for this benchmark to be used as part of my research and cited but my deadlines are being setback due to these errors.

Would really appreciate it if these were looked at. A duplicate issue has been opened for the same by another user.

QWQyyy commented 2 years ago

very interesting

CodingYuanLiu commented 2 years ago

Hi adhinneupane. I mean wsk log is not the activation list that you demonstrate here. I mean the actual log from the specific function instance. That can help you and me to understand where the Error comes from. For example. You can use wsk activation logs abe98dcb7ca647dfa98dcb7ca6a7dfb2 to see the error log from your transformMetadata function.

adhinneupane commented 2 years ago

The function invocations are successfull.

image

Standalone Openwhisk is not giving me activation id's for failures: I need to use standalone with couchdb for my use case.

image

I was using openwhisk-dev-tools/docker-compose to run it when i got the devloper error logs as seen in previous comments.

@CodingYuanLiu Are you able to run image-processing workload specifically or other test-cases? Can you please check on your end and let us know? If you are able to then I think we could benifit greatly if you share the configurations and dev-dependencies (if they are not documented)

CodingYuanLiu commented 2 years ago

I can use openwhisk on kubernetes to run the image-processing workload. The configurations about openwhisk can be seen below。 image We can get COUCHDB_IP, COUCHDB_PORT from kubernetes service configuration. username and password can also be seen in openwhisk config. I did not run the benchmark on openwhisk standalone. But i have run it successfully on openwhisk with docker-compose and kubernetes. Intuitively, there would be no difference between these ways. I guess maybe the container instance of your openwhisk function cannot access the couchdb outside using the IP.

adhinneupane commented 2 years ago

@CodingYuanLiu I have mentioned time and again that my configuration is correct citing the uploads of images to couchdb as proof (see screenshots from start of this conversation) I have also mentioned in each of my comments that this is not an issue but you keep telling me it is my issue. Can you share the screenshots of this benchmark running? I would like to see them (image processing specifically)

CodingYuanLiu commented 2 years ago

@adhinneupane Let me show you the screenshots of image-processing running:

b8165031ebe55224deaf749ff6de711

The activation logs can be seen below. 538df5bf1c0f232877f95c01b1c8991